Skip to content

Commit 60cbad4

Browse files
committed
fix unreliable variable type resolve
1 parent c344d29 commit 60cbad4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/com/intellij/plugins/haxe/model/evaluator/HaxeExpressionEvaluatorHandlers.java

+3
Original file line numberDiff line numberDiff line change
@@ -1751,6 +1751,9 @@ static ResultHolder handleLocalVarDeclaration(
17511751

17521752
if (result == null && init != null) {
17531753
result = _handle(init, context, localResolver);
1754+
// if result is null here, we have most likely hit a recursion guard (we should at least expect an "unknown" type returned)
1755+
// continuing after this point will probably cause incorrect results("find from usage" etc. can end up with completely different types)
1756+
if(result == null) return null;
17541757
}
17551758

17561759
// search for usage to determine type

0 commit comments

Comments
 (0)