PR changes, null check on returnType lookup
This commit is contained in:
parent
5bbc335034
commit
d4759480db
|
|
@ -149,11 +149,16 @@ final class FirstPass : ASTVisitor
|
|||
processParameters(currentSymbol, dec.returnType,
|
||||
currentSymbol.acSymbol.name, dec.parameters, dec.templateParameters);
|
||||
}
|
||||
auto app = appender!string();
|
||||
app.formatNode(dec.returnType);
|
||||
|
||||
currentSymbol.typeLookups.insert(TypeLookupsAllocator.instance.make!TypeLookup(
|
||||
istring(app.data), TypeLookupKind.returnType));
|
||||
if (dec.returnType !is null) {
|
||||
|
||||
// Do lookup if return type exists
|
||||
auto app = appender!string();
|
||||
app.formatNode(dec.returnType);
|
||||
|
||||
currentSymbol.typeLookups.insert(TypeLookupsAllocator.instance.make!TypeLookup(
|
||||
istring(app.data), TypeLookupKind.returnType));
|
||||
}
|
||||
}
|
||||
|
||||
override void visit(const FunctionLiteralExpression exp)
|
||||
|
|
|
|||
Loading…
Reference in New Issue