From a44f39b3e44b8073a925e276428ecfd581461f3e Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Thu, 28 May 2020 07:37:44 -0700 Subject: [PATCH] Fixed false error for calling static interface methods --- IDEHelper/Compiler/BfExprEvaluator.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/IDEHelper/Compiler/BfExprEvaluator.cpp b/IDEHelper/Compiler/BfExprEvaluator.cpp index 6f247054..5735d3f7 100644 --- a/IDEHelper/Compiler/BfExprEvaluator.cpp +++ b/IDEHelper/Compiler/BfExprEvaluator.cpp @@ -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())