diff --git a/gen/tocall.cpp b/gen/tocall.cpp index 82db954c..ce82c823 100644 --- a/gen/tocall.cpp +++ b/gen/tocall.cpp @@ -186,6 +186,10 @@ DValue* DtoCallFunction(Loc& loc, Type* resulttype, DValue* fnval, Expressions* // the callee D type Type* calleeType = fnval->getType(); + // if the type has not yet been processed, do so now + if (calleeType->ir.type == NULL) + DtoType(calleeType); + // get func value if any DFuncValue* dfnval = fnval->isFunc();