mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Fixed type population issue with enum UnderlyingType
This commit is contained in:
parent
cf78a02ab4
commit
5416d30bf1
2 changed files with 4 additions and 0 deletions
|
@ -11776,6 +11776,8 @@ bool BfExprEvaluator::LookupTypeProp(BfTypeOfExpression* typeOfExpr, BfIdentifie
|
||||||
}
|
}
|
||||||
else if (type->IsEnum())
|
else if (type->IsEnum())
|
||||||
{
|
{
|
||||||
|
if (type->IsDataIncomplete())
|
||||||
|
mModule->PopulateType(type);
|
||||||
auto underlyingType = type->GetUnderlyingType();
|
auto underlyingType = type->GetUnderlyingType();
|
||||||
if (underlyingType != NULL)
|
if (underlyingType != NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -8325,6 +8325,8 @@ BfType* BfModule::ResolveInnerType(BfType* outerType, BfAstNode* typeRef, BfPopu
|
||||||
|
|
||||||
if ((outerTypeInstance->IsEnum()) && (findName == "UnderlyingType"))
|
if ((outerTypeInstance->IsEnum()) && (findName == "UnderlyingType"))
|
||||||
{
|
{
|
||||||
|
if (outerTypeInstance->IsDataIncomplete())
|
||||||
|
PopulateType(outerTypeInstance);
|
||||||
auto underlyingType = outerTypeInstance->GetUnderlyingType();
|
auto underlyingType = outerTypeInstance->GetUnderlyingType();
|
||||||
if (underlyingType != NULL)
|
if (underlyingType != NULL)
|
||||||
return underlyingType;
|
return underlyingType;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue