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

Fixed false error for calling static interface methods

This commit is contained in:
Brian Fiete 2020-05-28 07:37:44 -07:00
parent be6a132fb5
commit a44f39b3e4

View file

@ -7048,6 +7048,10 @@ BfTypedValue BfExprEvaluator::MatchMethod(BfAstNode* targetSrc, BfMethodBoundExp
if ((target.mType == NULL) && ((mModule->mCurMethodInstance->mIsForeignMethodDef) || (mModule->mCurTypeInstance->IsInterface())))
isConstrained = true;
// If mIgnoreWrites is off then we skip devirtualization, so allow this
if ((target.mType != NULL) && (!target.mType->IsInterface()) && (mModule->mBfIRBuilder->mIgnoreWrites))
isConstrained = true;
if (!isConstrained)
{
if (mModule->mCurTypeInstance->IsInterface())