| 9792 | } |
| 9793 | |
| 9794 | BfGenericParamInstance* BfModule::GetGenericParamInstance(BfGenericParamType* type, bool checkMixinBind, BfFailHandleKind failHandleKind) |
| 9795 | { |
| 9796 | if (type->mGenericParamKind == BfGenericParamKind_Method) |
| 9797 | { |
| 9798 | auto curGenericMethodInstance = mCurMethodInstance; |
| 9799 | if ((mCurMethodState != NULL) && (mCurMethodState->mMixinState != NULL)) |
| 9800 | { |
| 9801 | if ((checkMixinBind) || (mCurMethodState->mMixinState->mUseMixinGenerics)) |
| 9802 | curGenericMethodInstance = mCurMethodState->mMixinState->mMixinMethodInstance; |
| 9803 | } |
| 9804 | |
| 9805 | if ((curGenericMethodInstance == NULL) || (curGenericMethodInstance->mMethodInfoEx == NULL) || (type->mGenericParamIdx >= curGenericMethodInstance->mMethodInfoEx->mGenericParams.mSize)) |
| 9806 | { |
| 9807 | if (failHandleKind == Beefy::BfFailHandleKind_Normal) |
| 9808 | FatalError("Invalid GetGenericParamInstance method generic param"); |
| 9809 | else if (failHandleKind == Beefy::BfFailHandleKind_Soft) |
| 9810 | InternalError("Invalid GetGenericParamInstance method generic param"); |
| 9811 | return NULL; |
| 9812 | } |
| 9813 | return curGenericMethodInstance->mMethodInfoEx->mGenericParams[type->mGenericParamIdx]; |
| 9814 | } |
| 9815 | |
| 9816 | return GetGenericTypeParamInstance(type->mGenericParamIdx, failHandleKind); |
| 9817 | } |
| 9818 | |
| 9819 | bool BfModule::ResolveTypeResult_Validate(BfAstNode* typeRef, BfType* resolvedTypeRef) |
| 9820 | { |
no outgoing calls
no test coverage detected