Version 2.15.0-21.0.dev Merge commit '5657acfc76275d5136eacf4c2a61d3f67583fd81' into 'dev'
diff --git a/DEPS b/DEPS index ee3a819..c7ffc18 100644 --- a/DEPS +++ b/DEPS
@@ -103,7 +103,7 @@ # and land the review. # # For more details, see https://github.com/dart-lang/sdk/issues/30164 - "dart_style_rev": "06bfd19593ed84dd288f67e02c6a753e6516288a", + "dart_style_rev": "14d9b6fd58cc4744676c12be3cc5eee2a779db82", "dartdoc_rev" : "5f39ec674d81f5c199151d823fa4ecd01fc59eb2", "devtools_rev" : "64cffbed6366329ad05e44d48fa2298367643bb6",
diff --git a/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.textual_outline_modelled.expect index fa69e2d..3d25c7a 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.textual_outline_modelled.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.textual_outline_modelled.expect
@@ -1,4 +1,6 @@ T func<T>(T value) => value; int Function(int) f = funcValue.call; +int Function(int) g = funcValue.call<int>; main() {} +test(Function f) {} var funcValue = func;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.textual_outline.expect index a4b6c13..7fa3351 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.textual_outline.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.textual_outline.expect
@@ -3,6 +3,7 @@ factory A.fact() => new A(); factory A.redirect() = A; } + typedef B<T> = A<T>; typedef C<T> = A<int>; const a = A.new;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.textual_outline_modelled.expect new file mode 100644 index 0000000..34b33d7 --- /dev/null +++ b/pkg/front_end/testcases/constructor_tearoffs/const_tear_off.dart.textual_outline_modelled.expect
@@ -0,0 +1,27 @@ +class A<T> { + A(); + factory A.fact() => new A(); + factory A.redirect() = A; +} + +const a = A.new; +const b = A<int>.new; +const c = A.fact; +const d = A<int>.fact; +const e = A.redirect; +const f = A<int>.redirect; +const g = B.new; +const h = B<int>.new; +const i = B.fact; +const j = B<int>.fact; +const k = B.redirect; +const l = B<int>.redirect; +const m = C.new; +const n = C<int>.new; +const o = C.fact; +const p = C<int>.fact; +const q = C.redirect; +const r = C<int>.redirect; +main() {} +typedef B<T> = A<T>; +typedef C<T> = A<int>;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart.textual_outline_modelled.expect new file mode 100644 index 0000000..1225dc9 --- /dev/null +++ b/pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart.textual_outline_modelled.expect
@@ -0,0 +1,5 @@ +main() {} +test1(dynamic x) => x.foo<int>; +test2(Never x) => x.foo<int>; +test3(dynamic x) => x.toString<int>; +test4(Never x) => x.toString<int>;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation_errors.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation_errors.dart.textual_outline_modelled.expect new file mode 100644 index 0000000..0e3fd34 --- /dev/null +++ b/pkg/front_end/testcases/constructor_tearoffs/explicit_instantiation_errors.dart.textual_outline_modelled.expect
@@ -0,0 +1,13 @@ +X boundedMethod<X extends num>(X x) => x; +X id<X>(X x) => x; +main() {} +test() {} +var a = id; +var b = a<int>; +var c = id<int>; +var d = id<int, String>; +var e = method<int>; +var f = 0<int>; +var g = main<int>; +var h = boundedMethod<String>; +void method<X, Y>() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/explicit_new_as_unnamed.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/explicit_new_as_unnamed.dart.textual_outline.expect index d6ac347..1c70682 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/explicit_new_as_unnamed.dart.textual_outline.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/explicit_new_as_unnamed.dart.textual_outline.expect
@@ -1,35 +1,43 @@ class A { A.new(); } + class B { B(); } + class C { C(); C.new(); } + class D { D.new(); D(); } + class E1 { E1._(); E1(); factory E1.new() => E1._(); } + class E2 { E2._(); factory E2.new() => E2._(); E2(); } + class E3 { E3._(); E3(); factory E3.new() = E3._; } + class E4 { E4._(); factory E4.new() = E4._; E4(); } + main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/explicit_new_as_unnamed.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/explicit_new_as_unnamed.dart.textual_outline_modelled.expect new file mode 100644 index 0000000..fd6763c --- /dev/null +++ b/pkg/front_end/testcases/constructor_tearoffs/explicit_new_as_unnamed.dart.textual_outline_modelled.expect
@@ -0,0 +1,43 @@ +class A { + A.new(); +} + +class B { + B(); +} + +class C { + C(); + C.new(); +} + +class D { + D(); + D.new(); +} + +class E1 { + E1(); + E1._(); + factory E1.new() => E1._(); +} + +class E2 { + E2(); + E2._(); + factory E2.new() => E2._(); +} + +class E3 { + E3(); + E3._(); + factory E3.new() = E3._; +} + +class E4 { + E4(); + E4._(); + factory E4.new() = E4._; +} + +main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.textual_outline.expect index 89a5de5..556ac62 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.textual_outline.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.textual_outline.expect
@@ -4,6 +4,7 @@ A(); factory A.bar1() => new A(); } + A<X> Function<X>(X) test1() => A.foo1; A<X> Function<X>(X) test2() => A.foo2; A<X> Function<X>(X) test3() => A.new;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.textual_outline_modelled.expect index 5110c82..fce295c 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.textual_outline_modelled.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_with_context.dart.textual_outline_modelled.expect
@@ -1,9 +1,22 @@ -A<X> Function<X>(X) bar1() => A.foo1; -A<X> Function<X>(X) bar2() => A.foo2; +A<X> Function<X>() test10() => A.bar1; +A<X> Function<X>(X) test1() => A.foo1; +A<X> Function<X>(X) test11() => A.bar1; +A<X> Function<X>(X) test2() => A.foo2; +A<X> Function<X>(X) test3() => A.new; +A<X> Function<X>(X) test4() => A<int>.new; +A<X> Function<X>(X) test5() => A<int, String>.new; +A<X> Function<X>(X) test6() => A<int>.foo1; +A<X> Function<X>(X) test7() => A<int, String>.foo1; +A<X> Function<X>(X) test8() => A<int>.foo2; +A<X> Function<X>(X) test9() => A<int, String>.foo2; +A<int> Function() test12() => A<int>.bar1; +A<int> Function() test13() => A.bar1; class A<X> { + A(); A.foo1(X x) {} A.foo2(X x, int y) {} + factory A.bar1() => new A(); } main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.textual_outline.expect index a5d04bf..16c7e62 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.textual_outline.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.textual_outline.expect
@@ -3,6 +3,7 @@ A() {} factory A.bar() => new A<X>(); } + testFoo() => A.foo; testFooArgs() => A<int>.foo; testNew() => A.new;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.textual_outline_modelled.expect index bd45e3c..bb92a38 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.textual_outline_modelled.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/generic_tearoff_without_context.dart.textual_outline_modelled.expect
@@ -1,7 +1,17 @@ -bar() => A.foo; - class A<X> { + A() {} A.foo() {} + factory A.bar() => new A<X>(); } main() {} +method() {} +testBar() => A.bar; +testBarArgs() => A<int>.bar; +testBarExtraArgs() => A<int, String>.bar; +testFoo() => A.foo; +testFooArgs() => A<int>.foo; +testFooExtraArgs() => A<int, String>.foo; +testNew() => A.new; +testNewArgs() => A<int>.new; +testNewExtraArgs() => A<int, String>.new;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/identical_instantiated_function_tearoffs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/identical_instantiated_function_tearoffs.dart.textual_outline_modelled.expect new file mode 100644 index 0000000..d650780 --- /dev/null +++ b/pkg/front_end/testcases/constructor_tearoffs/identical_instantiated_function_tearoffs.dart.textual_outline_modelled.expect
@@ -0,0 +1,8 @@ +T Function(T) create<T>() => id<T>; +T id<T>(T t) => t; +const explicitConstInstantiation = id<int>; +const int Function(int) implicitConstInstantiation = id; +expect(expected, actual) {} +int Function(int) implicitInstantiation = id; +main() {} +var explicitInstantiation = id<int>;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/inferred_constructor_tear_off.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/inferred_constructor_tear_off.dart.textual_outline.expect index 94115d1..f48ab14 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/inferred_constructor_tear_off.dart.textual_outline.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/inferred_constructor_tear_off.dart.textual_outline.expect
@@ -1,16 +1,20 @@ final bool inSoundMode = <int?>[] is! List<int>; main() {} + class Class1 { int field; Class1(this.field); } + abstract class Interface2 { int get field; } + class Class2 implements Interface2 { final field; Class2(this.field); } + var Class1_new = Class1.new; var Class2_new = Class2.new; testInferred() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/inferred_constructor_tear_off.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/inferred_constructor_tear_off.dart.textual_outline_modelled.expect new file mode 100644 index 0000000..99d1f46 --- /dev/null +++ b/pkg/front_end/testcases/constructor_tearoffs/inferred_constructor_tear_off.dart.textual_outline_modelled.expect
@@ -0,0 +1,21 @@ +abstract class Interface2 { + int get field; +} + +class Class1 { + Class1(this.field); + int field; +} + +class Class2 implements Interface2 { + Class2(this.field); + final field; +} + +expect(expected, actual) {} +final bool inSoundMode = <int?>[] is! List<int>; +main() {} +testInferred() {} +throws(Function() f, {bool inSoundModeOnly: false}) {} +var Class1_new = Class1.new; +var Class2_new = Class2.new;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.textual_outline.expect index 71dbef8..b8acf78 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.textual_outline.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.textual_outline.expect
@@ -1,5 +1,7 @@ final bool inSoundMode = <int?>[] is! List<int>; + class A<T> {} + typedef F<X extends num> = A<X>; typedef G<Y> = A<int>; typedef H<X, Y> = A<X>;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.textual_outline_modelled.expect new file mode 100644 index 0000000..5bf6db5 --- /dev/null +++ b/pkg/front_end/testcases/constructor_tearoffs/inferred_non_proper_rename.dart.textual_outline_modelled.expect
@@ -0,0 +1,18 @@ +class A<T> {} + +const A<int> Function() f1c = F.new; +const A<int> Function() g1c = G.new; +const A<int> Function() h1c = H.new; +const f1a = A<int>.new; +const f1b = F<int>.new; +const g1a = A<int>.new; +const g1b = G<String>.new; +const h1a = A<int>.new; +const h1b = H<int, String>.new; +expect(expected, actual) {} +final bool inSoundMode = <int?>[] is! List<int>; +main() {} +test<T extends num>() {} +typedef F<X extends num> = A<X>; +typedef G<Y> = A<int>; +typedef H<X, Y> = A<X>;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.textual_outline.expect index 53e6fd0..e1a475c 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.textual_outline.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.textual_outline.expect
@@ -3,6 +3,7 @@ A(X x) {} factory A.bar(X x) => new A<X>(x); } + A<num> Function(num) test1() => A.foo; A<int> Function(int) test2() => A.foo; A<num> Function(num) test3() => A.new;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.textual_outline_modelled.expect index 88026bf..2ea13b4 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.textual_outline_modelled.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/instantiation.dart.textual_outline_modelled.expect
@@ -1,9 +1,20 @@ -A<dynamic> Function(String) bar3() => A.foo; -A<int> Function(int) bar2() => A.foo; -A<num> Function(num) bar1() => A.foo; +A<dynamic> Function(String) test11() => A.bar; +A<dynamic> Function(String) test5() => A.foo; +A<dynamic> Function(String) test6() => A.new; +A<dynamic> Function(num) test12() => A.bar; +A<dynamic> Function(num) test7() => A<num>.foo; +A<dynamic> Function(num) test8() => A<num>.new; +A<int> Function(int) test10() => A.bar; +A<int> Function(int) test2() => A.foo; +A<int> Function(int) test4() => A.new; +A<num> Function(num) test1() => A.foo; +A<num> Function(num) test3() => A.new; +A<num> Function(num) test9() => A.bar; class A<X extends num> { + A(X x) {} A.foo(X x) {} + factory A.bar(X x) => new A<X>(x); } main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.textual_outline.expect index 94115d1..f48ab14 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.textual_outline.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.textual_outline.expect
@@ -1,16 +1,20 @@ final bool inSoundMode = <int?>[] is! List<int>; main() {} + class Class1 { int field; Class1(this.field); } + abstract class Interface2 { int get field; } + class Class2 implements Interface2 { final field; Class2(this.field); } + var Class1_new = Class1.new; var Class2_new = Class2.new; testInferred() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.textual_outline_modelled.expect index 8944ae7..99d1f46 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.textual_outline_modelled.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_constructor_tear_off.dart.textual_outline_modelled.expect
@@ -17,3 +17,5 @@ main() {} testInferred() {} throws(Function() f, {bool inSoundModeOnly: false}) {} +var Class1_new = Class1.new; +var Class2_new = Class2.new;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.textual_outline.expect index 8731bf4..7efc9f8 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.textual_outline.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.textual_outline.expect
@@ -1,9 +1,11 @@ final bool inSoundMode = <int?>[] is! List<int>; + class A<T> { A(); factory A.fact() => new A<T>(); factory A.redirect() = A<T>; } + typedef F<X extends num> = A<X>; typedef G<Y> = A<int>; typedef H<X, Y> = A<X>;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.textual_outline_modelled.expect new file mode 100644 index 0000000..ebc6c89 --- /dev/null +++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_non_proper_rename.dart.textual_outline_modelled.expect
@@ -0,0 +1,28 @@ +class A<T> { + A(); + factory A.fact() => new A<T>(); + factory A.redirect() = A<T>; +} + +const A<int> Function() f1c = F.new; +const A<int> Function() f1f = F.fact; +const A<int> Function() f1i = F.redirect; +const A<int> Function() g1c = G.new; +const A<int> Function() h1c = H.new; +const f1a = A<int>.new; +const f1b = F<int>.new; +const f1d = A<int>.fact; +const f1e = F<int>.fact; +const f1g = A<int>.redirect; +const f1h = F<int>.redirect; +const g1a = A<int>.new; +const g1b = G<String>.new; +const h1a = A<int>.new; +const h1b = H<int, String>.new; +expect(expected, actual) {} +final bool inSoundMode = <int?>[] is! List<int>; +main() {} +test<T extends num>() {} +typedef F<X extends num> = A<X>; +typedef G<Y> = A<int>; +typedef H<X, Y> = A<X>;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.textual_outline.expect index 12bef00..c125e6f 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.textual_outline.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.textual_outline.expect
@@ -2,17 +2,20 @@ var B_new = B.new; var F_new = F.new; var G_new = G.new; + class A { int field1 = 0; A(this.field1); A.named(this.field1); } + class B<T> implements A { var field1; T field2; B(this.field1, this.field2); B.named(this.field1, this.field2); } + typedef F<T> = A; typedef G<T extends num> = B; var A_named = A.named;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.textual_outline_modelled.expect new file mode 100644 index 0000000..b23c6e8 --- /dev/null +++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/inferred_tear_off.dart.textual_outline_modelled.expect
@@ -0,0 +1,24 @@ +class A { + A(this.field1); + A.named(this.field1); + int field1 = 0; +} + +class B<T> implements A { + B(this.field1, this.field2); + B.named(this.field1, this.field2); + T field2; + var field1; +} + +main() {} +typedef F<T> = A; +typedef G<T extends num> = B; +var A_named = A.named; +var A_new = A.new; +var B_named = B<int>.named; +var B_new = B.new; +var F_named = F.named; +var F_new = F.new; +var G_named = G<int>.named; +var G_new = G.new;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_from_dill/main.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_from_dill/main.dart.textual_outline.expect index 4d2dfc1..a676ddd 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_from_dill/main.dart.textual_outline.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_from_dill/main.dart.textual_outline.expect
@@ -1,4 +1,5 @@ import 'main_lib.dart'; + typedef H<X, Y> = A<Y>; dynamic H_new = H.new; dynamic H_named = H.named;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_from_dill/main.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_from_dill/main.dart.textual_outline_modelled.expect new file mode 100644 index 0000000..ea3a97b --- /dev/null +++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_from_dill/main.dart.textual_outline_modelled.expect
@@ -0,0 +1,13 @@ +import 'main_lib.dart'; + +dynamic F_fact = F.fact; +dynamic F_named = F.named; +dynamic F_new = F.new; +dynamic F_redirect = F.redirect; +dynamic H_fact = H.fact; +dynamic H_named = H.named; +dynamic H_new = H.new; +dynamic H_redirect = H.redirect; +expect(expected, actual) {} +main() {} +typedef H<X, Y> = A<Y>;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_identical.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_identical.dart.textual_outline.expect index 8ca6604..10356c5 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_identical.dart.textual_outline.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_identical.dart.textual_outline.expect
@@ -1,4 +1,5 @@ import 'typedef_identical_lib.dart'; + typedef H<X, Y> = A<Y>; var H_new = H.new; var H_named = H.named;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_identical.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_identical.dart.textual_outline_modelled.expect new file mode 100644 index 0000000..a3e22a5 --- /dev/null +++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/typedef_identical.dart.textual_outline_modelled.expect
@@ -0,0 +1,13 @@ +import 'typedef_identical_lib.dart'; + +expect(expected, actual) {} +main() {} +typedef H<X, Y> = A<Y>; +var F_fact = F.fact; +var F_named = F.named; +var F_new = F.new; +var F_redirect = F.redirect; +var H_fact = H.fact; +var H_named = H.named; +var H_new = H.new; +var H_redirect = H.redirect;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.textual_outline.expect index 8667cb7..69dd551 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.textual_outline.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.textual_outline.expect
@@ -4,6 +4,7 @@ A() {} factory A.bar1() => new A(); } + A Function() test1() => A.foo1; A Function() test2() => A.foo2; A Function() test3() => A.new;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.textual_outline_modelled.expect index c7ab6c9..16a7e1c 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.textual_outline_modelled.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_with_context.dart.textual_outline_modelled.expect
@@ -1,9 +1,15 @@ -A Function() bar1() => A.foo1; -A Function() bar2() => A.foo2; +A Function() test1() => A.foo1; +A Function() test2() => A.foo2; +A Function() test3() => A.new; +A Function() test5() => A.bar1; +A Function(int) test4() => A.new; +A Function(int) test6() => A.bar1; class A { + A() {} A.foo1() {} A.foo2(int x) {} + factory A.bar1() => new A(); } main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.textual_outline.expect index 7cdb5cd..17d1d98 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.textual_outline.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.textual_outline.expect
@@ -3,6 +3,7 @@ A() {} factory A.bar() => new A(); } + testFoo() => A.foo; testNew() => A.new; testBar() => A.bar;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.textual_outline_modelled.expect index 28ca878..b485543 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.textual_outline_modelled.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/nongeneric_tearoff_without_context.dart.textual_outline_modelled.expect
@@ -1,7 +1,13 @@ -bar() => A.foo; - class A { + A() {} A.foo() {} + factory A.bar() => new A(); } main() {} +testBar() => A.bar; +testBarExtraArgs() => A<int>.bar; +testFoo() => A.foo; +testFooExtraArgs() => A<int>.foo; +testNew() => A.new; +testNewExtraArgs() => A<int>.new;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart.textual_outline.expect index 1e775a7..bae4d9c 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart.textual_outline.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart.textual_outline.expect
@@ -4,6 +4,8 @@ factory A.redirectingFactoryChild() = B.new; factory A.redirectingTwice() = A.redirectingFactory; } + class B extends A {} + test() {} main() => test();
diff --git a/pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart.textual_outline_modelled.expect new file mode 100644 index 0000000..de66759 --- /dev/null +++ b/pkg/front_end/testcases/constructor_tearoffs/redirecting_constructors.dart.textual_outline_modelled.expect
@@ -0,0 +1,11 @@ +class A { + A.new(); + factory A.redirectingFactory() = A.new; + factory A.redirectingFactoryChild() = B.new; + factory A.redirectingTwice() = A.redirectingFactory; +} + +class B extends A {} + +main() => test(); +test() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/simple_instantiated_type_literals.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/simple_instantiated_type_literals.dart.textual_outline_modelled.expect new file mode 100644 index 0000000..caada6b --- /dev/null +++ b/pkg/front_end/testcases/constructor_tearoffs/simple_instantiated_type_literals.dart.textual_outline_modelled.expect
@@ -0,0 +1,3 @@ +bar() {} +foo() => List<int>; +main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.textual_outline.expect index 77787a1..3023dc3 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.textual_outline.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.textual_outline.expect
@@ -1,16 +1,27 @@ class A1<T> {} + typedef B1<T> = A1<T>; + class A2<T extends num> {} + typedef B2<T extends num> = A2<T>; + class A3<T extends List<dynamic>, S extends Never?> {} + typedef B3<T extends List<Object?>, S extends Null> = A3<T, S>; + class A4<T extends num> {} + typedef B4<T extends int> = A4<T>; + class A5<T extends List<dynamic>, S extends Never?> {} + typedef B5<T extends List<Object?>, S extends Null> = A5; + class StaticIdentityTest { const StaticIdentityTest(a, b) : assert(identical(a, b)); } + test1() => const StaticIdentityTest(A1.new, B1.new); test2() => const StaticIdentityTest(A2.new, B2.new); test3() => const StaticIdentityTest(A3.new, B3.new);
diff --git a/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.textual_outline_modelled.expect new file mode 100644 index 0000000..3167ee0 --- /dev/null +++ b/pkg/front_end/testcases/constructor_tearoffs/simple_proper_rename_identity.dart.textual_outline_modelled.expect
@@ -0,0 +1,25 @@ +class A1<T> {} + +class A2<T extends num> {} + +class A3<T extends List<dynamic>, S extends Never?> {} + +class A4<T extends num> {} + +class A5<T extends List<dynamic>, S extends Never?> {} + +class StaticIdentityTest { + const StaticIdentityTest(a, b) : assert(identical(a, b)); +} + +main() {} +test1() => const StaticIdentityTest(A1.new, B1.new); +test2() => const StaticIdentityTest(A2.new, B2.new); +test3() => const StaticIdentityTest(A3.new, B3.new); +test4() => const StaticIdentityTest(A4.new, B4.new); +test5() => const StaticIdentityTest(A5.new, B5.new); +typedef B1<T> = A1<T>; +typedef B2<T extends num> = A2<T>; +typedef B3<T extends List<Object?>, S extends Null> = A3<T, S>; +typedef B4<T extends int> = A4<T>; +typedef B5<T extends List<Object?>, S extends Null> = A5;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.textual_outline.expect index c3a7ab9..b8e1aba 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.textual_outline.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.textual_outline.expect
@@ -1,9 +1,11 @@ class A {} + class B<X> { B(); B.foo(); factory B.bar() => new B<X>(); } + typedef DA1 = A; typedef DA2<X extends num> = A; typedef DB1 = B<String>;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.textual_outline_modelled.expect new file mode 100644 index 0000000..43ab7d6 --- /dev/null +++ b/pkg/front_end/testcases/constructor_tearoffs/typedef_tearoffs.dart.textual_outline_modelled.expect
@@ -0,0 +1,39 @@ +A Function() test2() => DA1.new; +A Function() test4() => DA2.new; +A Function() test5() => DA2<String>.new; +A Function() test6() => DA2<int>.new; +B<String> Function() test10() => DB1.foo; +B<String> Function() test11() => DB1.bar; +B<String> Function() test24() => DB2.new; +B<String> Function() test8() => DB1.new; +B<Y> Function<Y, Z>() test23() => DB3.new; +B<Y> Function<Y>() test17() => DB2.new; +B<Y> Function<Y extends num, Z extends String>() test22() => DB3.new; +B<Y> Function<Y extends num>() test16() => DB2.new; +B<num> Function() test12() => DB2<num>.new; +B<num> Function() test13() => DB2<num>.foo; +B<num> Function() test14() => DB2<num>.bar; +B<num> Function() test15() => DB2.new; +B<num> Function() test18() => DB3<num, String>.new; +B<num> Function() test19() => DB3<num, String>.foo; +B<num> Function() test20() => DB3<num, String>.bar; +B<num> Function() test21() => DB3.new; +B<num> Function() test9() => DB1.new; +DA1 Function() test1() => DA1.new; +DA2<num> Function() test3() => DA2.new; +DB1 Function() test7() => DB1.new; + +class A {} + +class B<X> { + B(); + B.foo(); + factory B.bar() => new B<X>(); +} + +main() {} +typedef DA1 = A; +typedef DA2<X extends num> = A; +typedef DB1 = B<String>; +typedef DB2<X extends num> = B<X>; +typedef DB3<X extends num, Y extends String> = B<X>;
diff --git a/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.textual_outline.expect b/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.textual_outline.expect index 3e34a96..f161d57 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.textual_outline.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.textual_outline.expect
@@ -4,13 +4,17 @@ factory A.redirectingFactoryChild() = B.new; A.redirecting() : this.new(); } + class B extends A {} + class C { final int x; const C.new(this.x); } + class D extends C { D(int x) : super.new(x * 2); } + test() {} main() {}
diff --git a/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.textual_outline_modelled.expect new file mode 100644 index 0000000..00d195c --- /dev/null +++ b/pkg/front_end/testcases/constructor_tearoffs/unnamed_constructor.dart.textual_outline_modelled.expect
@@ -0,0 +1,20 @@ +class A { + A.new(); + A.redirecting() : this.new(); + factory A.redirectingFactory() = A.new; + factory A.redirectingFactoryChild() = B.new; +} + +class B extends A {} + +class C { + const C.new(this.x); + final int x; +} + +class D extends C { + D(int x) : super.new(x * 2); +} + +main() {} +test() {}
diff --git a/pkg/front_end/testcases/textual_outline.status b/pkg/front_end/testcases/textual_outline.status index ed0e7e4..2722562 100644 --- a/pkg/front_end/testcases/textual_outline.status +++ b/pkg/front_end/testcases/textual_outline.status
@@ -23,29 +23,6 @@ const_functions/const_functions_const_ctor: FormatterCrash const_functions/const_functions_const_ctor_error: FormatterCrash const_functions/const_functions_const_factory: FormatterCrash -constructor_tearoffs/call_instantiation: FormatterCrash -constructor_tearoffs/const_tear_off: FormatterCrash -constructor_tearoffs/dynamic_explicit_instantiation: FormatterCrash -constructor_tearoffs/explicit_instantiation_errors: FormatterCrash -constructor_tearoffs/explicit_new_as_unnamed: FormatterCrash -constructor_tearoffs/generic_tearoff_with_context: FormatterCrash -constructor_tearoffs/generic_tearoff_without_context: FormatterCrash -constructor_tearoffs/identical_instantiated_function_tearoffs: FormatterCrash -constructor_tearoffs/inferred_constructor_tear_off: FormatterCrash -constructor_tearoffs/inferred_non_proper_rename: FormatterCrash -constructor_tearoffs/instantiation: FormatterCrash -constructor_tearoffs/lowering/inferred_constructor_tear_off: FormatterCrash -constructor_tearoffs/lowering/inferred_non_proper_rename: FormatterCrash -constructor_tearoffs/lowering/inferred_tear_off: FormatterCrash -constructor_tearoffs/lowering/typedef_from_dill/main: FormatterCrash -constructor_tearoffs/lowering/typedef_identical: FormatterCrash -constructor_tearoffs/nongeneric_tearoff_with_context: FormatterCrash -constructor_tearoffs/nongeneric_tearoff_without_context: FormatterCrash -constructor_tearoffs/redirecting_constructors: FormatterCrash -constructor_tearoffs/simple_instantiated_type_literals: FormatterCrash -constructor_tearoffs/simple_proper_rename_identity: FormatterCrash -constructor_tearoffs/typedef_tearoffs: FormatterCrash -constructor_tearoffs/unnamed_constructor: FormatterCrash dart2js/late_fields: FormatterCrash dart2js/late_statics: FormatterCrash extension_types/simple_getter_resolution: FormatterCrash
diff --git a/tools/VERSION b/tools/VERSION index 2155d95..adb1407 100644 --- a/tools/VERSION +++ b/tools/VERSION
@@ -27,5 +27,5 @@ MAJOR 2 MINOR 15 PATCH 0 -PRERELEASE 20 +PRERELEASE 21 PRERELEASE_PATCH 0 \ No newline at end of file