| 11734 | } |
| 11735 | |
| 11736 | bool BfModule::IsMethodImplementedAndReified(BfTypeInstance* typeInstance, const StringImpl& methodName, int paramCount, bool checkBase) |
| 11737 | { |
| 11738 | while (typeInstance != NULL) |
| 11739 | { |
| 11740 | typeInstance->mTypeDef->PopulateMemberSets(); |
| 11741 | BfMemberSetEntry* entry = NULL; |
| 11742 | BfMethodDef* methodDef = NULL; |
| 11743 | if (typeInstance->mTypeDef->mMethodSet.TryGetWith(methodName, &entry)) |
| 11744 | methodDef = (BfMethodDef*)entry->mMemberDef; |
| 11745 | |
| 11746 | while (methodDef != NULL) |
| 11747 | { |
| 11748 | if ((methodDef->mMethodType != BfMethodType_Mixin) && |
| 11749 | (methodDef->mGenericParams.size() == 0) && |
| 11750 | ((paramCount == -1) || (paramCount == (int)methodDef->mParams.size()))) |
| 11751 | { |
| 11752 | auto& methodInstanceGroup = typeInstance->mMethodInstanceGroups[methodDef->mIdx]; |
| 11753 | if (!methodInstanceGroup.IsImplemented()) |
| 11754 | return false; |
| 11755 | if (methodInstanceGroup.mDefault == NULL) |
| 11756 | return false; |
| 11757 | return methodInstanceGroup.mDefault->mIsReified; |
| 11758 | } |
| 11759 | |
| 11760 | methodDef = methodDef->mNextWithSameName; |
| 11761 | } |
| 11762 | |
| 11763 | if (!checkBase) |
| 11764 | break; |
| 11765 | typeInstance = typeInstance->mBaseType; |
| 11766 | } |
| 11767 | return false; |
| 11768 | } |
| 11769 | |
| 11770 | bool BfModule::HasMixin(BfTypeInstance* typeInstance, const StringImpl& methodName, int paramCount, bool checkBase) |
| 11771 | { |
no test coverage detected