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

Added support for const string generic args

This commit is contained in:
Brian Fiete 2022-02-04 14:26:50 -05:00
parent 361be9dc92
commit a87ccd299d
5 changed files with 63 additions and 5 deletions

View file

@ -3723,6 +3723,9 @@ void BfExprEvaluator::GetLiteral(BfAstNode* refNode, const BfVariant& variant)
case BfTypeCode_Double:
mResult = BfTypedValue(mModule->mBfIRBuilder->CreateConst(variant.mTypeCode, variant.mDouble), mModule->GetPrimitiveType(variant.mTypeCode));
break;
case BfTypeCode_StringId:
mResult = BfTypedValue(mModule->mBfIRBuilder->CreateConst(variant.mTypeCode, variant.mUInt64), mModule->ResolveTypeDef(mModule->mCompiler->mStringTypeDef));
break;
default:
mModule->Fail("Invalid literal", refNode);
break;