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

Allow negation (-) on 'var' types

This commit is contained in:
Brian Fiete 2024-03-23 12:24:42 -04:00
parent 77826c90d2
commit fb86a8d5e3

View file

@ -22566,7 +22566,12 @@ void BfExprEvaluator::PerformUnaryOperation_OnResult(BfExpression* unaryOpExpr,
else if (value.mType->IsFloat())
mResult = BfTypedValue(mModule->mBfIRBuilder->CreateNeg(value.mValue), origType);
else
{
ResolveGenericType();
if (mResult.mType->IsVar())
break;
numericFail = true;
}
}
break;
case BfUnaryOp_InvertBits: