1
0
Fork 0
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:
Brian Fiete 2019-10-05 11:27:59 -07:00
parent 7e55369f92
commit 85d197f552
2 changed files with 7 additions and 0 deletions

View file

@ -493,6 +493,11 @@ namespace System
mTarget = target;
mFuncPtr = ptr;
}
protected override void GCMarkMembers()
{
GC.Mark(Internal.UnsafeCastToObject(mTarget));
}
}
struct DeferredCall

View file

@ -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())