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

Enums implementing an interface are not included when listing implementations #3067

Open
adam-openplay opened this issue Sep 20, 2024 · 0 comments
Labels

Comments

@adam-openplay
Copy link

Describe the bug

If an enum implements an interface, it is not included in the list of implementations for that interface like classes are.

This only applies to the enum as a whole. The list of implementations of a method in an interface does include enum methods.

To Reproduce

interface Foo
{
	public function getSomething(): string;
}

class FooClass implements Foo // This class is in the list of implementations of `Foo`
{
    public function getSomething(): string // This method is in the list of implementations of `Foo::getSomething()`
    {
        return 'something';
    }
}

enum FooEnum implements Foo // This enum is NOT in the list of implementations of `Foo`
{
    public function getSomething(): string // This method is in the list of implementations of `Foo::getSomething()`
    {
        return 'something';
    }
}

Expected behavior

Enums should be listed alongside classes that implement an interface.

Screenshots

N/A

Platform and version

Ubuntu 24.04.1LTS
Intelephense 1.12.6
Neovim LSP client

@bmewburn bmewburn added the bug label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants