Skip to content

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

Closed
@alexmarkov

Description

@alexmarkov

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.

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