Skip to content
This repository has been 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 opened this issue Oct 3, 2016 · 0 comments

Comments

@matthias-springer
Copy link
Contributor

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);
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant