Store AstExprFunction in astTypes for stats

This commit is contained in:
JohnnyMorganz 2022-07-24 21:07:28 +01:00
parent 12c5502027
commit 6200806e94

View file

@ -3640,6 +3640,9 @@ void TypeChecker::checkFunctionBody(const ScopePtr& scope, TypeId ty, const AstE
reportError(getEndLocation(function), FunctionExitsWithoutReturning{funTy->retTypes});
}
}
if (!currentModule->astTypes.find(&function))
currentModule->astTypes[&function] = ty;
}
else
ice("Checking non functional type");