haxe icon indicating copy to clipboard operation
haxe copied to clipboard

Erroneous "Unused import/using" when importing module types

Open Aidan63 opened this issue 1 year ago • 0 comments

On nightlies if you have module Foo containing

class Foo {
    public static function foo() {}
}

class Bar {
    public static function bar() {}
}

and another module imports a specific type and uses it

import Foo.Bar;

function main() {
    Bar.bar();
}

You will receive an erroneous "Unused import/using" warning on that import. Changing the line to import the entire module import Foo has it correctly detected as used. Importing specific module level functions do not suffer from this. This works fine on 4.3.x so appears to be a regression.

Aidan63 avatar Mar 29 '24 10:03 Aidan63