mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Support for const expressions for bools & chars
This commit is contained in:
parent
2a98bf00d5
commit
28689853d2
6 changed files with 42 additions and 4 deletions
|
@ -2787,7 +2787,9 @@ BfVariant BfResolvedTypeSet::EvaluateToVariant(LookupContext* ctx, BfExpression*
|
|||
|
||||
// Limit the types of constants to prevent duplicate values with different types - we don't want to hash a typeref with an int32
|
||||
// when the constraint requirement is int64 (but we don't know that at hash time)
|
||||
if (BfIRConstHolder::IsInt(variant.mTypeCode))
|
||||
if (BfIRConstHolder::IsChar(variant.mTypeCode))
|
||||
variant.mTypeCode = BfTypeCode_Char32;
|
||||
else if (BfIRConstHolder::IsInt(variant.mTypeCode))
|
||||
variant.mTypeCode = BfTypeCode_Int64;
|
||||
else if (variant.mTypeCode == BfTypeCode_Float)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue