Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit b01ec50

Browse files
author
Dart CI
committed
Version 2.15.0-21.0.dev
Merge commit '5657acfc76275d5136eacf4c2a61d3f67583fd81' into 'dev'
2 parents 8bd1304 + 5657acf commit b01ec50

File tree

44 files changed

+424
-36
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+424
-36
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ vars = {
103103
# and land the review.
104104
#
105105
# For more details, see https://github.com/dart-lang/sdk/issues/30164
106-
"dart_style_rev": "06bfd19593ed84dd288f67e02c6a753e6516288a",
106+
"dart_style_rev": "14d9b6fd58cc4744676c12be3cc5eee2a779db82",
107107

108108
"dartdoc_rev" : "5f39ec674d81f5c199151d823fa4ecd01fc59eb2",
109109
"devtools_rev" : "64cffbed6366329ad05e44d48fa2298367643bb6",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
T func<T>(T value) => value;
22
int Function(int) f = funcValue.call;
3+
int Function(int) g = funcValue.call<int>;
34
main() {}
5+
test(Function f) {}
46
var funcValue = func;

pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.textual_outline.expect

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ class A<T> {
33
factory A.fact() => new A();
44
factory A.redirect() = A;
55
}
6+
67
typedef B<T> = A<T>;
78
typedef C<T> = A<int>;
89
const a = A.new;
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
class A<T> {
2+
A();
3+
factory A.fact() => new A();
4+
factory A.redirect() = A;
5+
}
6+
7+
const a = A.new;
8+
const b = A<int>.new;
9+
const c = A.fact;
10+
const d = A<int>.fact;
11+
const e = A.redirect;
12+
const f = A<int>.redirect;
13+
const g = B.new;
14+
const h = B<int>.new;
15+
const i = B.fact;
16+
const j = B<int>.fact;
17+
const k = B.redirect;
18+
const l = B<int>.redirect;
19+
const m = C.new;
20+
const n = C<int>.new;
21+
const o = C.fact;
22+
const p = C<int>.fact;
23+
const q = C.redirect;
24+
const r = C<int>.redirect;
25+
main() {}
26+
typedef B<T> = A<T>;
27+
typedef C<T> = A<int>;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
main() {}
2+
test1(dynamic x) => x.foo<int>;
3+
test2(Never x) => x.foo<int>;
4+
test3(dynamic x) => x.toString<int>;
5+
test4(Never x) => x.toString<int>;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
X boundedMethod<X extends num>(X x) => x;
2+
X id<X>(X x) => x;
3+
main() {}
4+
test() {}
5+
var a = id;
6+
var b = a<int>;
7+
var c = id<int>;
8+
var d = id<int, String>;
9+
var e = method<int>;
10+
var f = 0<int>;
11+
var g = main<int>;
12+
var h = boundedMethod<String>;
13+
void method<X, Y>() {}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,43 @@
11
class A {
22
A.new();
33
}
4+
45
class B {
56
B();
67
}
8+
79
class C {
810
C();
911
C.new();
1012
}
13+
1114
class D {
1215
D.new();
1316
D();
1417
}
18+
1519
class E1 {
1620
E1._();
1721
E1();
1822
factory E1.new() => E1._();
1923
}
24+
2025
class E2 {
2126
E2._();
2227
factory E2.new() => E2._();
2328
E2();
2429
}
30+
2531
class E3 {
2632
E3._();
2733
E3();
2834
factory E3.new() = E3._;
2935
}
36+
3037
class E4 {
3138
E4._();
3239
factory E4.new() = E4._;
3340
E4();
3441
}
42+
3543
main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
class A {
2+
A.new();
3+
}
4+
5+
class B {
6+
B();
7+
}
8+
9+
class C {
10+
C();
11+
C.new();
12+
}
13+
14+
class D {
15+
D();
16+
D.new();
17+
}
18+
19+
class E1 {
20+
E1();
21+
E1._();
22+
factory E1.new() => E1._();
23+
}
24+
25+
class E2 {
26+
E2();
27+
E2._();
28+
factory E2.new() => E2._();
29+
}
30+
31+
class E3 {
32+
E3();
33+
E3._();
34+
factory E3.new() = E3._;
35+
}
36+
37+
class E4 {
38+
E4();
39+
E4._();
40+
factory E4.new() = E4._;
41+
}
42+
43+
main() {}

pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.textual_outline.expect

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ class A<X> {
44
A();
55
factory A.bar1() => new A();
66
}
7+
78
A<X> Function<X>(X) test1() => A.foo1;
89
A<X> Function<X>(X) test2() => A.foo2;
910
A<X> Function<X>(X) test3() => A.new;
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
1-
A<X> Function<X>(X) bar1() => A.foo1;
2-
A<X> Function<X>(X) bar2() => A.foo2;
1+
A<X> Function<X>() test10() => A.bar1;
2+
A<X> Function<X>(X) test1() => A.foo1;
3+
A<X> Function<X>(X) test11() => A.bar1;
4+
A<X> Function<X>(X) test2() => A.foo2;
5+
A<X> Function<X>(X) test3() => A.new;
6+
A<X> Function<X>(X) test4() => A<int>.new;
7+
A<X> Function<X>(X) test5() => A<int, String>.new;
8+
A<X> Function<X>(X) test6() => A<int>.foo1;
9+
A<X> Function<X>(X) test7() => A<int, String>.foo1;
10+
A<X> Function<X>(X) test8() => A<int>.foo2;
11+
A<X> Function<X>(X) test9() => A<int, String>.foo2;
12+
A<int> Function() test12() => A<int>.bar1;
13+
A<int> Function() test13() => A.bar1;
314

415
class A<X> {
16+
A();
517
A.foo1(X x) {}
618
A.foo2(X x, int y) {}
19+
factory A.bar1() => new A();
720
}
821

922
main() {}

pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.textual_outline.expect

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ class A<X> {
33
A() {}
44
factory A.bar() => new A<X>();
55
}
6+
67
testFoo() => A.foo;
78
testFooArgs() => A<int>.foo;
89
testNew() => A.new;
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1-
bar() => A.foo;
2-
31
class A<X> {
2+
A() {}
43
A.foo() {}
4+
factory A.bar() => new A<X>();
55
}
66

77
main() {}
8+
method() {}
9+
testBar() => A.bar;
10+
testBarArgs() => A<int>.bar;
11+
testBarExtraArgs() => A<int, String>.bar;
12+
testFoo() => A.foo;
13+
testFooArgs() => A<int>.foo;
14+
testFooExtraArgs() => A<int, String>.foo;
15+
testNew() => A.new;
16+
testNewArgs() => A<int>.new;
17+
testNewExtraArgs() => A<int, String>.new;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
T Function(T) create<T>() => id<T>;
2+
T id<T>(T t) => t;
3+
const explicitConstInstantiation = id<int>;
4+
const int Function(int) implicitConstInstantiation = id;
5+
expect(expected, actual) {}
6+
int Function(int) implicitInstantiation = id;
7+
main() {}
8+
var explicitInstantiation = id<int>;

pkg/front_end/testcases/constructor_tearoffs/inferred_constructor_tear_off.dart.textual_outline.expect

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
final bool inSoundMode = <int?>[] is! List<int>;
22
main() {}
3+
34
class Class1 {
45
int field;
56
Class1(this.field);
67
}
8+
79
abstract class Interface2 {
810
int get field;
911
}
12+
1013
class Class2 implements Interface2 {
1114
final field;
1215
Class2(this.field);
1316
}
17+
1418
var Class1_new = Class1.new;
1519
var Class2_new = Class2.new;
1620
testInferred() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
abstract class Interface2 {
2+
int get field;
3+
}
4+
5+
class Class1 {
6+
Class1(this.field);
7+
int field;
8+
}
9+
10+
class Class2 implements Interface2 {
11+
Class2(this.field);
12+
final field;
13+
}
14+
15+
expect(expected, actual) {}
16+
final bool inSoundMode = <int?>[] is! List<int>;
17+
main() {}
18+
testInferred() {}
19+
throws(Function() f, {bool inSoundModeOnly: false}) {}
20+
var Class1_new = Class1.new;
21+
var Class2_new = Class2.new;

pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.textual_outline.expect

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
final bool inSoundMode = <int?>[] is! List<int>;
2+
23
class A<T> {}
4+
35
typedef F<X extends num> = A<X>;
46
typedef G<Y> = A<int>;
57
typedef H<X, Y> = A<X>;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
class A<T> {}
2+
3+
const A<int> Function() f1c = F.new;
4+
const A<int> Function() g1c = G.new;
5+
const A<int> Function() h1c = H.new;
6+
const f1a = A<int>.new;
7+
const f1b = F<int>.new;
8+
const g1a = A<int>.new;
9+
const g1b = G<String>.new;
10+
const h1a = A<int>.new;
11+
const h1b = H<int, String>.new;
12+
expect(expected, actual) {}
13+
final bool inSoundMode = <int?>[] is! List<int>;
14+
main() {}
15+
test<T extends num>() {}
16+
typedef F<X extends num> = A<X>;
17+
typedef G<Y> = A<int>;
18+
typedef H<X, Y> = A<X>;

pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.textual_outline.expect

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ class A<X extends num> {
33
A(X x) {}
44
factory A.bar(X x) => new A<X>(x);
55
}
6+
67
A<num> Function(num) test1() => A.foo;
78
A<int> Function(int) test2() => A.foo;
89
A<num> Function(num) test3() => A.new;
Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
1-
A<dynamic> Function(String) bar3() => A.foo;
2-
A<int> Function(int) bar2() => A.foo;
3-
A<num> Function(num) bar1() => A.foo;
1+
A<dynamic> Function(String) test11() => A.bar;
2+
A<dynamic> Function(String) test5() => A.foo;
3+
A<dynamic> Function(String) test6() => A.new;
4+
A<dynamic> Function(num) test12() => A.bar;
5+
A<dynamic> Function(num) test7() => A<num>.foo;
6+
A<dynamic> Function(num) test8() => A<num>.new;
7+
A<int> Function(int) test10() => A.bar;
8+
A<int> Function(int) test2() => A.foo;
9+
A<int> Function(int) test4() => A.new;
10+
A<num> Function(num) test1() => A.foo;
11+
A<num> Function(num) test3() => A.new;
12+
A<num> Function(num) test9() => A.bar;
413

514
class A<X extends num> {
15+
A(X x) {}
616
A.foo(X x) {}
17+
factory A.bar(X x) => new A<X>(x);
718
}
819

920
main() {}

pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.textual_outline.expect

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
final bool inSoundMode = <int?>[] is! List<int>;
22
main() {}
3+
34
class Class1 {
45
int field;
56
Class1(this.field);
67
}
8+
79
abstract class Interface2 {
810
int get field;
911
}
12+
1013
class Class2 implements Interface2 {
1114
final field;
1215
Class2(this.field);
1316
}
17+
1418
var Class1_new = Class1.new;
1519
var Class2_new = Class2.new;
1620
testInferred() {}

pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.textual_outline_modelled.expect

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ final bool inSoundMode = <int?>[] is! List<int>;
1717
main() {}
1818
testInferred() {}
1919
throws(Function() f, {bool inSoundModeOnly: false}) {}
20+
var Class1_new = Class1.new;
21+
var Class2_new = Class2.new;

pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.textual_outline.expect

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
final bool inSoundMode = <int?>[] is! List<int>;
2+
23
class A<T> {
34
A();
45
factory A.fact() => new A<T>();
56
factory A.redirect() = A<T>;
67
}
8+
79
typedef F<X extends num> = A<X>;
810
typedef G<Y> = A<int>;
911
typedef H<X, Y> = A<X>;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
class A<T> {
2+
A();
3+
factory A.fact() => new A<T>();
4+
factory A.redirect() = A<T>;
5+
}
6+
7+
const A<int> Function() f1c = F.new;
8+
const A<int> Function() f1f = F.fact;
9+
const A<int> Function() f1i = F.redirect;
10+
const A<int> Function() g1c = G.new;
11+
const A<int> Function() h1c = H.new;
12+
const f1a = A<int>.new;
13+
const f1b = F<int>.new;
14+
const f1d = A<int>.fact;
15+
const f1e = F<int>.fact;
16+
const f1g = A<int>.redirect;
17+
const f1h = F<int>.redirect;
18+
const g1a = A<int>.new;
19+
const g1b = G<String>.new;
20+
const h1a = A<int>.new;
21+
const h1b = H<int, String>.new;
22+
expect(expected, actual) {}
23+
final bool inSoundMode = <int?>[] is! List<int>;
24+
main() {}
25+
test<T extends num>() {}
26+
typedef F<X extends num> = A<X>;
27+
typedef G<Y> = A<int>;
28+
typedef H<X, Y> = A<X>;

0 commit comments

Comments
 (0)