mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Fixed error when const range checking against null
This commit is contained in:
parent
7e55369f92
commit
85d197f552
2 changed files with 7 additions and 0 deletions
|
@ -493,6 +493,11 @@ namespace System
|
|||
mTarget = target;
|
||||
mFuncPtr = ptr;
|
||||
}
|
||||
|
||||
protected override void GCMarkMembers()
|
||||
{
|
||||
GC.Mark(Internal.UnsafeCastToObject(mTarget));
|
||||
}
|
||||
}
|
||||
|
||||
struct DeferredCall
|
||||
|
|
|
@ -16241,6 +16241,8 @@ bool BfExprEvaluator::CheckConstCompare(BfBinaryOp binaryOp, BfAstNode* opToken,
|
|||
|
||||
BF_ASSERT(rightValue.mValue.IsConst());
|
||||
auto rightConst = mModule->mBfIRBuilder->GetConstant(rightValue.mValue);
|
||||
if (!mModule->mBfIRBuilder->IsInt(rightConst->mTypeCode))
|
||||
return false;
|
||||
|
||||
BfType* checkType = leftValue.mType;
|
||||
if (checkType->IsTypedPrimitive())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue