diff --git a/IDEHelper/Compiler/BfIRBuilder.cpp b/IDEHelper/Compiler/BfIRBuilder.cpp index 2c8380b5..07806541 100644 --- a/IDEHelper/Compiler/BfIRBuilder.cpp +++ b/IDEHelper/Compiler/BfIRBuilder.cpp @@ -2717,9 +2717,6 @@ void BfIRBuilder::CreateTypeDeclaration(BfType* type, bool forceDbgDefine) if ((typeInstance != NULL) && (typeInstance->mModule != NULL)) populateModule = typeInstance->mModule; - //TODO: Temporary - populateModule = mModule; - bool wantDIData = DbgHasInfo() && (!type->IsUnspecializedType()); // Types that don't have a proper 'defining module' need to be defined in every module they are used diff --git a/IDEHelper/Compiler/BfModuleTypeUtils.cpp b/IDEHelper/Compiler/BfModuleTypeUtils.cpp index 9f9375cf..c7c09c91 100644 --- a/IDEHelper/Compiler/BfModuleTypeUtils.cpp +++ b/IDEHelper/Compiler/BfModuleTypeUtils.cpp @@ -1257,6 +1257,22 @@ void BfModule::PopulateType(BfType* resolvedTypeRef, BfPopulateType populateType } } } + else + { + // If we're a type like "A*", make sure we reify "A" if necessary + auto checkUnderlying = resolvedTypeRef->GetUnderlyingType(); + while (checkUnderlying != NULL) + { + auto checkTypeInst = checkUnderlying->ToTypeInstance(); + if (checkTypeInst != NULL) + { + if (!checkTypeInst->mIsReified) + PopulateType(checkTypeInst, BfPopulateType_BaseType); + break; + } + checkUnderlying = checkUnderlying->GetUnderlyingType(); + } + } } if (!resolvedTypeRef->IsIncomplete())