mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 20:12:21 +02:00
PopulateType fixes with nested generic type references
This commit is contained in:
parent
f8d6f1405a
commit
35584ef288
2 changed files with 23 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
using System;
|
||||||
namespace IDETest
|
namespace IDETest
|
||||||
{
|
{
|
||||||
class Declarations
|
class Declarations
|
||||||
|
@ -55,5 +56,25 @@ namespace IDETest
|
||||||
mSA.mB = 234;
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10917,6 +10917,8 @@ BfType* BfModule::ResolveTypeRef(BfTypeReference* typeRef, BfPopulateType popula
|
||||||
auto parentTypeInstance = outerTypeInstance;
|
auto parentTypeInstance = outerTypeInstance;
|
||||||
if ((parentTypeInstance != NULL) && (parentTypeInstance->IsTypeAlias()))
|
if ((parentTypeInstance != NULL) && (parentTypeInstance->IsTypeAlias()))
|
||||||
parentTypeInstance = (BfTypeInstance*)GetOuterType(parentTypeInstance)->ToTypeInstance();
|
parentTypeInstance = (BfTypeInstance*)GetOuterType(parentTypeInstance)->ToTypeInstance();
|
||||||
|
if (parentTypeInstance->mDefineState < BfTypeDefineState_Declared)
|
||||||
|
PopulateType(parentTypeInstance, BfPopulateType_Declaration);
|
||||||
if ((parentTypeInstance != NULL) && (parentTypeInstance->IsGenericTypeInstance()))
|
if ((parentTypeInstance != NULL) && (parentTypeInstance->IsGenericTypeInstance()))
|
||||||
{
|
{
|
||||||
genericTypeInst->mGenericTypeInfo->mMaxGenericDepth = BF_MAX(genericTypeInst->mGenericTypeInfo->mMaxGenericDepth, parentTypeInstance->mGenericTypeInfo->mMaxGenericDepth);
|
genericTypeInst->mGenericTypeInfo->mMaxGenericDepth = BF_MAX(genericTypeInst->mGenericTypeInfo->mMaxGenericDepth, parentTypeInstance->mGenericTypeInfo->mMaxGenericDepth);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue