From 4d37da5c442fff5a2b61f977ee04e15611e7603d Mon Sep 17 00:00:00 2001 From: m0rkeulv Date: Tue, 20 Feb 2024 18:00:24 +0100 Subject: [PATCH] fixing incorrect handling of function bind --- CHANGELOG.md | 2 ++ .../intellij/plugins/haxe/lang/psi/impl/HaxeReferenceImpl.java | 1 + 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 490006912..3e3169aa0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ # Changelog +## 1.4.42 +* Bugfix: function bindings was incorrectly treated as static extensions ## 1.4.41 * Bugfix: fixed type resolve regression for iterators ## 1.4.40 diff --git a/src/main/java/com/intellij/plugins/haxe/lang/psi/impl/HaxeReferenceImpl.java b/src/main/java/com/intellij/plugins/haxe/lang/psi/impl/HaxeReferenceImpl.java index 90516fbae..4f6301fe8 100644 --- a/src/main/java/com/intellij/plugins/haxe/lang/psi/impl/HaxeReferenceImpl.java +++ b/src/main/java/com/intellij/plugins/haxe/lang/psi/impl/HaxeReferenceImpl.java @@ -189,6 +189,7 @@ public boolean resolveIsStaticExtension() { if (ChainBeforeMethod instanceof HaxeIdentifier) return false; // not chain, got method identifer if (ChainBeforeMethod instanceof HaxeReferenceExpression referenceExpression1) { PsiElement caller = referenceExpression1.resolve(); + if (caller == method) return false; // probably a function bind or similar // todo find using import statement for methods declaring class and confirm "using" return !(caller instanceof HaxeClass || caller instanceof HaxeImportAlias); }else {