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

Method GetBaseType

IDEHelper/Compiler/BfModuleTypeUtils.cpp:8554–8570  ·  view source on GitHub ↗

Get BaseClass even when we haven't populated the type yet

Source from the content-addressed store, hash-verified

8552
8553// Get BaseClass even when we haven't populated the type yet
8554BfTypeInstance* BfModule::GetBaseType(BfTypeInstance* typeInst)
8555{
8556 if (typeInst->mBaseType == NULL)
8557 {
8558 auto checkTypeState = mContext->mCurTypeState;
8559 while (checkTypeState != NULL)
8560 {
8561 if (checkTypeState->mType == typeInst)
8562 return NULL;
8563 checkTypeState = checkTypeState->mPrevState;
8564 }
8565 }
8566
8567 if ((typeInst->mBaseType == NULL) && (typeInst != mContext->mBfObjectType))
8568 PopulateType(typeInst, BfPopulateType_BaseType);
8569 return typeInst->mBaseType;
8570}
8571
8572void BfModule::HandleTypeGenericParamRef(BfAstNode* refNode, BfTypeDef* typeDef, int typeGenericParamIdx)
8573{

Callers 2

AddCurrentTypesMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected