Skip to content

As a developer I want another case of type inference supported by the poly processor #2436

@mmews-n4

Description

@mmews-n4

Example

class G<T> {
}
class X {
    public static field : G<?>;
}
class Y extends X {
    // XPECT noerrors --> "Type of static field Y.field must equal type of overridden static field X.field" at "field"
    @Override
    public static field = new G<string>;
}

Current workaround is to annotate the type from the superclass:
public static field : G<?> = new G<string>;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions