Browse Source

Fixed abstract default interface methods

Brian Fiete 4 năm trước cách đây
mục cha
commit
cad0b10aae
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  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;