Skip to content

Commit

Permalink
adding check initExpression for enumHints
Browse files Browse the repository at this point in the history
  • Loading branch information
m0rkeulv committed Apr 1, 2024
1 parent b878c1c commit 1c2ea96
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,13 @@ private List<? extends PsiElement> checkEnumMemberHints(HaxeReference reference)
return findEnumMember(reference, typeReference);
}
}
if (field.getVarInit() != null) {
ResultHolder type = HaxeTypeResolver.getPsiElementType(field.getVarInit(), null);
if (type.getClassType() != null) {
SpecificTypeReference typeReference = type.getClassType().fullyResolveTypeDefAndUnwrapNullTypeReference();
return findEnumMember(reference, typeReference);
}
}
}

HaxeParameter parameter = PsiTreeUtil.getParentOfType(reference, HaxeParameter.class);
Expand Down

0 comments on commit 1c2ea96

Please sign in to comment.