Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erroneous "Unused import/using" when importing module types #11620

Open
Aidan63 opened this issue Mar 29, 2024 · 0 comments
Open

Erroneous "Unused import/using" when importing module types #11620

Aidan63 opened this issue Mar 29, 2024 · 0 comments

Comments

@Aidan63
Copy link
Contributor

Aidan63 commented Mar 29, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant