mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Fixed _ in enum during autocomplete
This commit is contained in:
parent
881803b549
commit
97a828a12a
1 changed files with 7 additions and 3 deletions
|
@ -3934,12 +3934,16 @@ BfTypedValue BfExprEvaluator::LookupIdentifier(BfAstNode* refNode, const StringI
|
||||||
}
|
}
|
||||||
checkTypeState = checkTypeState->mPrevState;
|
checkTypeState = checkTypeState->mPrevState;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((resolvingFieldDef != NULL) && (resolvingFieldDef->mIdx > 0))
|
if ((resolvingFieldDef != NULL) && (mModule->mCompiler->mResolvePassData != NULL) && (mModule->mCompiler->mResolvePassData->mParser == resolvingFieldDef->mFieldDeclaration->GetParser()))
|
||||||
|
{
|
||||||
|
return mModule->GetDefaultTypedValue(mModule->mCurTypeInstance);
|
||||||
|
}
|
||||||
|
else if ((resolvingFieldDef != NULL) && (resolvingFieldDef->mIdx > 0))
|
||||||
{
|
{
|
||||||
auto enumType = mModule->mCurTypeInstance;
|
auto enumType = mModule->mCurTypeInstance;
|
||||||
if (!enumType->mFieldInstances.IsEmpty())
|
if (!enumType->mFieldInstances.IsEmpty())
|
||||||
{
|
{
|
||||||
auto fieldInstance = &mModule->mCurTypeInstance->mFieldInstances[resolvingFieldDef->mIdx - 1];
|
auto fieldInstance = &mModule->mCurTypeInstance->mFieldInstances[resolvingFieldDef->mIdx - 1];
|
||||||
if ((fieldInstance->mConstIdx != -1) &&
|
if ((fieldInstance->mConstIdx != -1) &&
|
||||||
(fieldInstance->mResolvedType == mModule->mCurTypeInstance))
|
(fieldInstance->mResolvedType == mModule->mCurTypeInstance))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue