Skip to content

Commit

Permalink
Fix autocomplete in unittest blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackerpilot committed Sep 19, 2014
1 parent adc7faf commit 9828e50
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libdparse
7 changes: 4 additions & 3 deletions src/conversion/first.d
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ final class FirstPass : ASTVisitor
{
// Create a dummy symbol because we don't want unit test symbols leaking
// into the symbol they're declared in.
SemanticSymbol* s = allocateSemanticSymbol("*unittest*",
SemanticSymbol* s = allocateSemanticSymbol(internString("*unittest*"),
CompletionKind.dummy, null, 0);
s.parent = currentSymbol;
currentSymbol.addChild(s);
currentSymbol = s;
u.accept(this);
currentSymbol = s.parent;
Expand Down Expand Up @@ -384,9 +385,9 @@ final class FirstPass : ASTVisitor

if (blockStatement.declarationsAndStatements !is null)
{
currentScope = s;
currentScope = s;
visit (blockStatement.declarationsAndStatements);
currentScope = s.parent;
currentScope = s.parent;
}
}

Expand Down

0 comments on commit 9828e50

Please sign in to comment.