diff --git a/IDE/Tests/CompileFail001/src/Declarations.bf b/IDE/Tests/CompileFail001/src/Declarations.bf index fa5256c0..13edb92d 100644 --- a/IDE/Tests/CompileFail001/src/Declarations.bf +++ b/IDE/Tests/CompileFail001/src/Declarations.bf @@ -1,3 +1,4 @@ +using System; namespace IDETest { class Declarations @@ -55,5 +56,25 @@ namespace IDETest mSA.mB = 234; } } + + [AttributeUsage(.All)] + struct AttribAAttribute : Attribute + { + AttribAAttribute mVal; //FAIL + } + + [AttributeUsage(.All)] + struct AttribBAttribute : Attribute + { + [AttribB] //FAIL + int mVal; //FAIL + } + + [AttributeUsage(.All)] + struct AttribCAttribute : Attribute + { + [AttribC] //FAIL + int Val => 123; //FAIL + } } } diff --git a/IDEHelper/Compiler/BfModuleTypeUtils.cpp b/IDEHelper/Compiler/BfModuleTypeUtils.cpp index 21d7a2a7..77ba5134 100644 --- a/IDEHelper/Compiler/BfModuleTypeUtils.cpp +++ b/IDEHelper/Compiler/BfModuleTypeUtils.cpp @@ -10917,6 +10917,8 @@ BfType* BfModule::ResolveTypeRef(BfTypeReference* typeRef, BfPopulateType popula auto parentTypeInstance = outerTypeInstance; if ((parentTypeInstance != NULL) && (parentTypeInstance->IsTypeAlias())) parentTypeInstance = (BfTypeInstance*)GetOuterType(parentTypeInstance)->ToTypeInstance(); + if (parentTypeInstance->mDefineState < BfTypeDefineState_Declared) + PopulateType(parentTypeInstance, BfPopulateType_Declaration); if ((parentTypeInstance != NULL) && (parentTypeInstance->IsGenericTypeInstance())) { genericTypeInst->mGenericTypeInfo->mMaxGenericDepth = BF_MAX(genericTypeInst->mGenericTypeInfo->mMaxGenericDepth, parentTypeInstance->mGenericTypeInfo->mMaxGenericDepth);