MCPcopy Create free account
hub / github.com/beefytech/Beef / GetGenericParamInstance

Method GetGenericParamInstance

IDEHelper/Compiler/BfModuleTypeUtils.cpp:9794–9817  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9792}
9793
9794BfGenericParamInstance* 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
9819bool BfModule::ResolveTypeResult_Validate(BfAstNode* typeRef, BfType* resolvedTypeRef)
9820{

Callers 15

CheckMemberReferenceMethod · 0.80
BfBaseClassWalkerMethod · 0.80
InitMethod · 0.80
InferGenericArgumentMethod · 0.80
InferGenericArgumentsMethod · 0.80
CheckMethodMethod · 0.80
LookupIdentifierMethod · 0.80
LookupFieldMethod · 0.80
MatchMethodMethod · 0.80
LookupQualifiedNameMethod · 0.80
LookupTypePropMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected