Fix autocomplete in unittest blocks
This commit is contained in:
parent
adc7faf425
commit
9828e5062f
|
|
@ -1 +1 @@
|
||||||
Subproject commit 50f0e833ce664ebb46ada342a2e14c1e1eff0c71
|
Subproject commit 27f45e6490e7ef0e9a6ef604e51f68a54b10ee2d
|
||||||
|
|
@ -70,9 +70,10 @@ final class FirstPass : ASTVisitor
|
||||||
{
|
{
|
||||||
// Create a dummy symbol because we don't want unit test symbols leaking
|
// Create a dummy symbol because we don't want unit test symbols leaking
|
||||||
// into the symbol they're declared in.
|
// into the symbol they're declared in.
|
||||||
SemanticSymbol* s = allocateSemanticSymbol("*unittest*",
|
SemanticSymbol* s = allocateSemanticSymbol(internString("*unittest*"),
|
||||||
CompletionKind.dummy, null, 0);
|
CompletionKind.dummy, null, 0);
|
||||||
s.parent = currentSymbol;
|
s.parent = currentSymbol;
|
||||||
|
currentSymbol.addChild(s);
|
||||||
currentSymbol = s;
|
currentSymbol = s;
|
||||||
u.accept(this);
|
u.accept(this);
|
||||||
currentSymbol = s.parent;
|
currentSymbol = s.parent;
|
||||||
|
|
@ -384,9 +385,9 @@ final class FirstPass : ASTVisitor
|
||||||
|
|
||||||
if (blockStatement.declarationsAndStatements !is null)
|
if (blockStatement.declarationsAndStatements !is null)
|
||||||
{
|
{
|
||||||
currentScope = s;
|
currentScope = s;
|
||||||
visit (blockStatement.declarationsAndStatements);
|
visit (blockStatement.declarationsAndStatements);
|
||||||
currentScope = s.parent;
|
currentScope = s.parent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue