Skip to content

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

@alexmarkov

Description

@alexmarkov

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>);

Metadata

Metadata

Assignees

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