Skip to content

Commit

Permalink
Fixes #3008. Rewrite type_inference_A01_t06.dart to get the context t…
Browse files Browse the repository at this point in the history
…ype _ (#3009)

Rewrite type_inference_A01_t06.dart to get context type `_`
  • Loading branch information
sgrekhov authored Dec 6, 2024
1 parent a1ab34d commit 486d45a
Showing 1 changed file with 26 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,37 @@ class C extends A {
static C get zero => C(0);
}

void foo<X, Y, Z>(X x, Y y, Z z) {}
void bar<X extends A, Y extends A, Z extends A>(X x, Y y, Z z) {}

main() {
List<A> l = {
.zero,
// ^
foo(
.zero,
// ^
// [analyzer] unspecified
// [cfe] unspecified
.new(1),
// ^
// [analyzer] unspecified
// [cfe] unspecified
.id(2)
// ^
// [analyzer] unspecified
// [cfe] unspecified
);

bar(
.zero,
// ^
// [analyzer] unspecified
// [cfe] unspecified
.new(1),
// ^
.new(1),
// ^
// [analyzer] unspecified
// [cfe] unspecified
.id(2)
// ^
.id(2)
// ^
// [analyzer] unspecified
// [cfe] unspecified
}.toList();
);
}

0 comments on commit 486d45a

Please sign in to comment.