Skip to content

IntelliJ incorrectly reports “Field is never used” for Manifold properties overridden from interfaces #63

@EotT123

Description

@EotT123

IntelliJ incorrectly reports an “Field is never used” warning for overridden Manifold properties that are declared in an interface and implemented in a concrete class, but not directly referenced within that class. This occurs when the property is only used in a default method defined in the interface.

interface MyIntf {
    @val String foo;  

    default String doSomething(){
        return foo + "test";
    }
}

class MyClass implements MyIntf {
    @override @val String foo = "foo"; // warning: Field 'foo' is never used
}
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions