Skip to content

Type resolution: Add support for enclosing methods and constructors #87

@ljacqu

Description

@ljacqu

Classes can be inside methods and, strangely enough, inside constructors:

    private <T> MainClass() {
        class Foo {
            private T elem;
        }
    }

As in the example, there might be type information to get from there. This issue is about extending TypeVariableResolver#registerTypes to not just consider the enclosing class but enclosing methods and constructors, too.

Note that initializer blocks may also contain local classes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions