Skip to content

Commit

Permalink
Fix infinite loop in typeSwap()
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackerpilot committed Apr 12, 2016
1 parent 040327e commit ba109a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/dsymbol/conversion/second.d
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,8 @@ void resolveTypeFromInitializer(DSymbol* symbol, TypeLookup* lookup,

void typeSwap(ref DSymbol* currentSymbol)
{
while (currentSymbol !is null && (currentSymbol.kind == CompletionKind.variableName
while (currentSymbol !is null && currentSymbol.type !is currentSymbol
&& (currentSymbol.kind == CompletionKind.variableName
|| currentSymbol.kind == CompletionKind.importSymbol
|| currentSymbol.kind == CompletionKind.withSymbol
|| currentSymbol.kind == CompletionKind.aliasName))
Expand Down

0 comments on commit ba109a4

Please sign in to comment.