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

Method GetUnspecializedTypeInstance

IDEHelper/Compiler/BfModuleTypeUtils.cpp:13061–13074  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13059}
13060
13061BfTypeInstance* BfModule::GetUnspecializedTypeInstance(BfTypeInstance* typeInst)
13062{
13063 if (!typeInst->IsGenericTypeInstance())
13064 return typeInst;
13065
13066 BF_ASSERT((!typeInst->IsDelegateFromTypeRef()) && (!typeInst->IsFunctionFromTypeRef()));
13067
13068 auto genericTypeInst = (BfTypeInstance*)typeInst;
13069 auto result = ResolveTypeDef(genericTypeInst->mTypeDef->GetDefinition(), BfPopulateType_Declaration);
13070 BF_ASSERT((result != NULL) && (result->IsUnspecializedType()));
13071 if (result == NULL)
13072 return NULL;
13073 return result->ToTypeInstance();
13074}
13075
13076BfType* BfModule::ResolveTypeRef_Type(BfAstNode* astNode, const BfSizedArray<BfAstNode*>* genericArgs, BfPopulateType populateType, BfResolveTypeRefFlags& resolveFlags)
13077{

Callers 1

PopulateReifiedMethod · 0.80

Calls 6

GetDefinitionMethod · 0.80
IsGenericTypeInstanceMethod · 0.45
IsDelegateFromTypeRefMethod · 0.45
IsFunctionFromTypeRefMethod · 0.45
IsUnspecializedTypeMethod · 0.45
ToTypeInstanceMethod · 0.45

Tested by

no test coverage detected