Skip to content
This repository was archived by the owner on Jul 27, 2022. It is now read-only.
This repository was archived by the owner on Jul 27, 2022. It is now read-only.

Fix Type of Generic new Expression without Explicit Assignment #4

Open
@matthias-springer

Description

@matthias-springer

The following code does not compile correctly:

class A<T> {
    T variable;
}

void main() {
    print(new A<int>().variable);
}

There is something wrong with inserting type casts. The following variation works:

var result = new A<int>();
print(result.variable);

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