Fix 'impl' elements being added to parent scope
This commit is contained in:
parent
509d5a3c69
commit
0b7aacbc1e
1 changed files with 2 additions and 4 deletions
|
@ -143,7 +143,6 @@ export class BoltSymbolResolutionStrategy implements ResolutionStrategy {
|
||||||
case SyntaxKind.BoltTypeAliasDeclaration:
|
case SyntaxKind.BoltTypeAliasDeclaration:
|
||||||
case SyntaxKind.BoltRecordDeclaration:
|
case SyntaxKind.BoltRecordDeclaration:
|
||||||
case SyntaxKind.BoltTraitDeclaration:
|
case SyntaxKind.BoltTraitDeclaration:
|
||||||
case SyntaxKind.BoltImplDeclaration:
|
|
||||||
case SyntaxKind.BoltTypeParameter:
|
case SyntaxKind.BoltTypeParameter:
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
|
@ -169,8 +168,6 @@ export class BoltSymbolResolutionStrategy implements ResolutionStrategy {
|
||||||
return node.name.text;
|
return node.name.text;
|
||||||
case SyntaxKind.BoltTraitDeclaration:
|
case SyntaxKind.BoltTraitDeclaration:
|
||||||
return node.name.text;
|
return node.name.text;
|
||||||
case SyntaxKind.BoltImplDeclaration:
|
|
||||||
return node.type;
|
|
||||||
default:
|
default:
|
||||||
throw new Error(`Could not derive symbol name of node ${kindToString(node.kind)}`)
|
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
|
return source.node.kind === SyntaxKind.BoltSourceFile
|
||||||
|| source.node.kind === SyntaxKind.BoltModule
|
|| source.node.kind === SyntaxKind.BoltModule
|
||||||
|| source.node.kind === SyntaxKind.BoltFunctionDeclaration
|
|| source.node.kind === SyntaxKind.BoltFunctionDeclaration
|
||||||
|| source.node.kind === SyntaxKind.BoltBlockExpression;
|
|| source.node.kind === SyntaxKind.BoltBlockExpression
|
||||||
|
|| source.node.kind === SyntaxKind.BoltImplDeclaration;
|
||||||
case ScopeType.Type:
|
case ScopeType.Type:
|
||||||
return source.node.kind === SyntaxKind.BoltModule
|
return source.node.kind === SyntaxKind.BoltModule
|
||||||
|| source.node.kind === SyntaxKind.BoltSourceFile
|
|| source.node.kind === SyntaxKind.BoltSourceFile
|
||||||
|
|
Loading…
Reference in a new issue