Skip to content
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

co19/LanguageFeatures/nnbd/type_reification_A01_t03 has an incorrect expectation #630

Closed
alexmarkov opened this issue Apr 30, 2020 · 0 comments
Assignees

Comments

@alexmarkov
Copy link

This test has expectation

Expect.isFalse(test4 is F2<int, B<Object>, A1>);

It also has explicit requirement nnbd-weak, so this test runs in NNBD weak mode.

test4 has type

<B1 extends B<dynamic>>(A1) => int

and F2<int, B<Object>, A1> expands into

<YY extends B<Object>>(A1) => int

These function types are compatible because bounds of generic type parameters B<dynamic> and B<Object> are mutual subtypes in NNBD weak mode (but not in strong mode).

So the expectation should be

Expect.isTrue(test4 is F2<int, B<Object>, A1>);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants