From 0b7aacbc1e32156e5473a7abfaa558ae8c7bbda0 Mon Sep 17 00:00:00 2001 From: Sam Vervaeck Date: Tue, 16 Jun 2020 20:52:33 +0200 Subject: [PATCH] Fix 'impl' elements being added to parent scope --- src/resolver.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/resolver.ts b/src/resolver.ts index 74f6cc791..bf30d7bc6 100644 --- a/src/resolver.ts +++ b/src/resolver.ts @@ -143,7 +143,6 @@ export class BoltSymbolResolutionStrategy implements ResolutionStrategy { case SyntaxKind.BoltTypeAliasDeclaration: case SyntaxKind.BoltRecordDeclaration: case SyntaxKind.BoltTraitDeclaration: - case SyntaxKind.BoltImplDeclaration: case SyntaxKind.BoltTypeParameter: return true; default: @@ -169,8 +168,6 @@ export class BoltSymbolResolutionStrategy implements ResolutionStrategy { return node.name.text; case SyntaxKind.BoltTraitDeclaration: return node.name.text; - case SyntaxKind.BoltImplDeclaration: - return node.type; default: throw new Error(`Could not derive symbol name of node ${kindToString(node.kind)}`) } @@ -208,7 +205,8 @@ export class BoltSymbolResolutionStrategy implements ResolutionStrategy { return source.node.kind === SyntaxKind.BoltSourceFile || source.node.kind === SyntaxKind.BoltModule || source.node.kind === SyntaxKind.BoltFunctionDeclaration - || source.node.kind === SyntaxKind.BoltBlockExpression; + || source.node.kind === SyntaxKind.BoltBlockExpression + || source.node.kind === SyntaxKind.BoltImplDeclaration; case ScopeType.Type: return source.node.kind === SyntaxKind.BoltModule || source.node.kind === SyntaxKind.BoltSourceFile