浏览代码

Fixed abstract default interface methods

Brian Fiete 4 年之前
父节点
当前提交
cad0b10aae
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      IDEHelper/Compiler/BfModuleTypeUtils.cpp

+ 2 - 1
IDEHelper/Compiler/BfModuleTypeUtils.cpp

@@ -4849,7 +4849,8 @@ void BfModule::DoTypeInstanceMethodProcessing(BfTypeInstance* typeInstance)
 							}
 						}
 
-						if ((bestMethodInst->mMethodDef->HasBody()) && (matchedMethod == NULL))
+						bool hasDefaultImpl = bestMethodInst->mMethodDef->HasBody() || bestMethodInst->mMethodDef->mIsAbstract;
+						if ((hasDefaultImpl) && (matchedMethod == NULL))
 						{
 							auto methodDef = bestMethodInst->mMethodDef;
 							BfGetMethodInstanceFlags flags = BfGetMethodInstanceFlag_ForeignMethodDef;