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

Fixed const float generic arg

This commit is contained in:
Brian Fiete 2021-02-19 16:14:35 -08:00
parent 9a854a0237
commit 8047bebfca

View file

@ -11626,14 +11626,17 @@ BfVariant BfModule::TypedValueToVariant(BfAstNode* refNode, const BfTypedValue&
case BfTypeCode_UIntPtr:
case BfTypeCode_IntUnknown:
case BfTypeCode_UIntUnknown:
case BfTypeCode_Float:
case BfTypeCode_Double:
case BfTypeCode_Char8:
case BfTypeCode_Char16:
case BfTypeCode_Char32:
variant.mTypeCode = constant->mTypeCode;
variant.mInt64 = constant->mInt64;
break;
break;
case BfTypeCode_Float:
variant.mTypeCode = constant->mTypeCode;
variant.mSingle = (float)constant->mDouble;
break;
default:
if (refNode != NULL)
Fail("Invalid const expression type", refNode);