mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
Allow negation (-) on 'var' types
This commit is contained in:
parent
77826c90d2
commit
fb86a8d5e3
1 changed files with 5 additions and 0 deletions
|
@ -22566,7 +22566,12 @@ void BfExprEvaluator::PerformUnaryOperation_OnResult(BfExpression* unaryOpExpr,
|
||||||
else if (value.mType->IsFloat())
|
else if (value.mType->IsFloat())
|
||||||
mResult = BfTypedValue(mModule->mBfIRBuilder->CreateNeg(value.mValue), origType);
|
mResult = BfTypedValue(mModule->mBfIRBuilder->CreateNeg(value.mValue), origType);
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
ResolveGenericType();
|
||||||
|
if (mResult.mType->IsVar())
|
||||||
|
break;
|
||||||
numericFail = true;
|
numericFail = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BfUnaryOp_InvertBits:
|
case BfUnaryOp_InvertBits:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue