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:
parent
361be9dc92
commit
a87ccd299d
5 changed files with 63 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue