mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fixed attempted static lookup in enum underlying type
This commit is contained in:
parent
053919d99e
commit
f56667ff61
2 changed files with 14 additions and 6 deletions
|
@ -3322,9 +3322,14 @@ BfTypedValue BfExprEvaluator::LookupIdentifier(BfAstNode* refNode, const StringI
|
|||
}
|
||||
}
|
||||
|
||||
if (!thisValue.HasType())
|
||||
thisValue = BfTypedValue(mModule->mCurTypeInstance);
|
||||
BfTypedValue result = LookupField(identifierNode, thisValue, findName, BfLookupFieldFlag_IsImplicitThis);
|
||||
if (!thisValue.HasType())
|
||||
{
|
||||
thisValue = BfTypedValue(mModule->mCurTypeInstance);
|
||||
}
|
||||
|
||||
BfTypedValue result;
|
||||
if (thisValue.HasType())
|
||||
result = LookupField(identifierNode, thisValue, findName, BfLookupFieldFlag_IsImplicitThis);
|
||||
if (mPropDef != NULL)
|
||||
{
|
||||
if (forcedIFaceLookup)
|
||||
|
@ -8173,7 +8178,7 @@ void BfExprEvaluator::LookupQualifiedStaticField(BfAstNode* nameNode, BfIdentifi
|
|||
BfType* type = NULL;
|
||||
{
|
||||
SetAndRestoreValue<bool> prevIgnoreErrors(mModule->mIgnoreErrors, true);
|
||||
type = mModule->ResolveTypeRef(nameLeft, NULL, BfPopulateType_Data, BfResolveTypeRefFlag_AllowRef);
|
||||
type = mModule->ResolveTypeRef(nameLeft, NULL, BfPopulateType_Declaration, BfResolveTypeRefFlag_AllowRef);
|
||||
}
|
||||
if (type != NULL)
|
||||
{
|
||||
|
@ -16672,7 +16677,9 @@ void BfExprEvaluator::DoMemberReference(BfMemberReferenceExpression* memberRefEx
|
|||
if (!thisValue)
|
||||
{
|
||||
if (auto targetIdentifier = BfNodeDynCast<BfIdentifierNode>(exprTarget))
|
||||
thisValue = BfTypedValue(mModule->ResolveTypeRef(targetIdentifier, NULL));
|
||||
{
|
||||
thisValue = BfTypedValue(mModule->ResolveTypeRef(targetIdentifier, NULL, BfPopulateType_Declaration));
|
||||
}
|
||||
}
|
||||
|
||||
if (!thisValue.HasType())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue