1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Added comptype test

This commit is contained in:
Brian Fiete 2021-01-16 06:26:55 -08:00
parent 83069fa216
commit 8435caf340
8 changed files with 87 additions and 47 deletions

View file

@ -2912,6 +2912,9 @@ BfType* BfExprEvaluator::BindGenericType(BfAstNode* node, BfType* bindType)
if (!bindType->IsGenericParam())
return bindType;
if (genericTypeBindings == NULL)
return bindType;
(*genericTypeBindings)[nodeId] = bindType;
return bindType;
}
@ -5338,6 +5341,10 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, BfMethodInstance*
// This either generated an error already or this is just the non-const type check pass for a comptime-only method
doConstReturn = true;
}
else if ((mBfEvalExprFlags & BfEvalExprFlags_DisallowComptime) != 0)
{
doConstReturn = true;
}
else
{
CeEvalFlags evalFlags = CeEvalFlags_None;