mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-15 06:44:10 +02:00
Fixed crash with increment/decrement error
This commit is contained in:
parent
4b64f2c14d
commit
f6ab79d2ef
1 changed files with 5 additions and 7 deletions
|
@ -18385,7 +18385,6 @@ void BfExprEvaluator::PerformUnaryOperation_OnResult(BfExpression* unaryOpExpr,
|
||||||
constValue = mModule->GetConstValue(1, ptr.mType);
|
constValue = mModule->GetConstValue(1, ptr.mType);
|
||||||
if (!constValue)
|
if (!constValue)
|
||||||
{
|
{
|
||||||
mResult = BfTypedValue();
|
|
||||||
numericFail = true;
|
numericFail = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -18395,7 +18394,6 @@ void BfExprEvaluator::PerformUnaryOperation_OnResult(BfExpression* unaryOpExpr,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mResult = BfTypedValue();
|
|
||||||
numericFail = true;
|
numericFail = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -18584,7 +18582,7 @@ void BfExprEvaluator::PerformUnaryOperation_OnResult(BfExpression* unaryOpExpr,
|
||||||
{
|
{
|
||||||
BF_ASSERT(mModule->mBfIRBuilder->mIgnoreWrites);
|
BF_ASSERT(mModule->mBfIRBuilder->mIgnoreWrites);
|
||||||
}
|
}
|
||||||
else if (mResult.mType->IsInterface())
|
else if ((mResult.mType != NULL) && (mResult.mType->IsInterface()))
|
||||||
{
|
{
|
||||||
mModule->Fail(
|
mModule->Fail(
|
||||||
StrFormat("Operator '%s' cannot be used on interface '%s'. Consider rewriting using generics and use this interface as a generic constraint.",
|
StrFormat("Operator '%s' cannot be used on interface '%s'. Consider rewriting using generics and use this interface as a generic constraint.",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue