(symbol *ast.Symbol, node *ast.Node)
| 2536 | } |
| 2537 | |
| 2538 | func SetValueDeclaration(symbol *ast.Symbol, node *ast.Node) { |
| 2539 | valueDeclaration := symbol.ValueDeclaration |
| 2540 | if valueDeclaration == nil || |
| 2541 | isAssignmentDeclaration(valueDeclaration) && !isAssignmentDeclaration(node) || |
| 2542 | valueDeclaration.Kind != node.Kind && isEffectiveModuleDeclaration(valueDeclaration) { |
| 2543 | // Non-assignment declarations take precedence over assignment declarations and |
| 2544 | // non-namespace declarations take precedence over namespace declarations. |
| 2545 | symbol.ValueDeclaration = node |
| 2546 | } |
| 2547 | } |
| 2548 | |
| 2549 | /** |
| 2550 | * Declares a Symbol for the node and adds it to symbols. Reports errors for conflicting identifier names. |
no test coverage detected