Skip to content

Instantiate to bound errors for constructors issued prematurely. #28539

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
leafpetersen opened this issue Jan 27, 2017 · 2 comments
Closed

Instantiate to bound errors for constructors issued prematurely. #28539

leafpetersen opened this issue Jan 27, 2017 · 2 comments
Assignees
Labels
legacy-area-analyzer Use area-devexp instead. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@leafpetersen
Copy link
Member

The following code should be valid, because inference will fill in the type parameters to the Foo constructor call. Instead an error is issued prematurely because Foo has no default bounds.

class Bar<T> {}

class Foo<T extends Bar<T>> {
  Foo(T y);
}

class Baz extends Bar<Baz> {}

void test() {
  Baz a;
  var x = new Foo(a);
}
@leafpetersen leafpetersen added this to the 1.50 milestone Jan 27, 2017
@bwilkerson bwilkerson added P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Jan 31, 2017
@mit-mit mit-mit modified the milestones: 1.23, 1.50 Jan 31, 2017
@leafpetersen leafpetersen removed this from the 1.23 milestone Mar 9, 2017
@devoncarew devoncarew added this to the 2.0-alpha2 milestone Jan 26, 2018
@devoncarew devoncarew modified the milestones: 2.0-alpha2, 2.0-beta1 Feb 8, 2018
@leafpetersen
Copy link
Member Author

This doesn't seem to reproduce, can we close?

@bwilkerson
Copy link
Member

Closing as obsolete. Please re-open if that's not the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy-area-analyzer Use area-devexp instead. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

4 participants