Skip to content

Incorrect expectation in co19/LanguageFeatures/Constructor-tear-offs/named_constructor_A06_t01 #1160

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
alexmarkov opened this issue Aug 12, 2021 · 0 comments
Assignees

Comments

@alexmarkov
Copy link

Constructor tear-off are taken from a type C with specified type arguments. So these tear-offs are already instantiated and not generic. However, all checks in this test expect to find generic functions:

var v1 = C<dynamic, num, String>.constr;
Expect.isTrue(v1 is
C Function<T1 extends dynamic, T2 extends num, T3 extends String>());
var v2 = C<dynamic, num, String>.constr1;
Expect.isTrue(v2 is C Function<T1 extends dynamic,
T2 extends num,
T3 extends String>(dynamic, num));
var v3 = C<List<int>, int, String>.constr;
Expect.isTrue(v3 is
C Function<T1 extends List<int>, T2 extends int, T3 extends String>());
var v4 = C<List<int>, int, String>.constr1;
Expect.isTrue(v3 is C Function<T1 extends List<int>,
T2 extends int,
T3 extends String>(List<int>, int));

In fact types of those tear-offs are C Function(), C Function(dynamic, num), C Function() and C Function(List<int>, int).

Also, the last check is performed against v3 and not v4.

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