Remove references to constructor-tearoff experiment.
TEST=Modifying existing tests.
Change-Id: I22fa11a5f2efc4bd6d1d54a656106f40bbfeafb3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220002
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
diff --git a/pkg/compiler/test/rti/rti_emission_test_helper.dart b/pkg/compiler/test/rti/rti_emission_test_helper.dart
index aa48230..e484961 100644
--- a/pkg/compiler/test/rti/rti_emission_test_helper.dart
+++ b/pkg/compiler/test/rti/rti_emission_test_helper.dart
@@ -31,7 +31,6 @@
new Directory.fromUri(Platform.script.resolve('emission'));
await checkTests(dataDir, const RtiEmissionDataComputer(),
args: args,
- options: ['--enable-experiment=constructor-tearoffs'],
shardIndex: shardIndex ?? 0,
shards: shardIndex != null ? 4 : 1);
});
diff --git a/pkg/compiler/test/rti/rti_need_test_helper.dart b/pkg/compiler/test/rti/rti_need_test_helper.dart
index f72a9f4..02aaf4e 100644
--- a/pkg/compiler/test/rti/rti_need_test_helper.dart
+++ b/pkg/compiler/test/rti/rti_need_test_helper.dart
@@ -34,7 +34,6 @@
asyncTest(() async {
Directory dataDir = new Directory.fromUri(Platform.script.resolve('data'));
await checkTests(dataDir, const RtiNeedDataComputer(),
- options: ['--enable-experiment=constructor-tearoffs'],
args: args,
shardIndex: shardIndex ?? 0,
shards: shardIndex != null ? 4 : 1);
diff --git a/pkg/front_end/testcases/constructor_tearoffs/folder.options b/pkg/front_end/testcases/constructor_tearoffs/folder.options
index 73976a7..0318d1c 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/folder.options
+++ b/pkg/front_end/testcases/constructor_tearoffs/folder.options
@@ -1,2 +1 @@
---enable-experiment=constructor-tearoffs
--force-constructor-tear-off-lowering=0
diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/folder.options b/pkg/front_end/testcases/constructor_tearoffs/lowering/folder.options
index 8b3469f..a5f8886 100644
--- a/pkg/front_end/testcases/constructor_tearoffs/lowering/folder.options
+++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/folder.options
@@ -1,2 +1 @@
---enable-experiment=constructor-tearoffs
---force-constructor-tear-off-lowering
\ No newline at end of file
+--force-constructor-tear-off-lowering
diff --git a/runtime/observatory/tests/service/constructor_tear_off_test.dart b/runtime/observatory/tests/service/constructor_tear_off_test.dart
index 672a1a1..ac105e2 100644
--- a/runtime/observatory/tests/service/constructor_tear_off_test.dart
+++ b/runtime/observatory/tests/service/constructor_tear_off_test.dart
@@ -4,8 +4,6 @@
// @dart=2.15
-// SharedOptions=--enable-experiment=constructor-tearoffs
-
import 'package:observatory/service_common.dart';
import 'package:test/test.dart';
diff --git a/tests/language/const/constant_type_variable_error_test.dart b/tests/language/const/constant_type_variable_error_test.dart
index 6e2438b..369d1ee 100644
--- a/tests/language/const/constant_type_variable_error_test.dart
+++ b/tests/language/const/constant_type_variable_error_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=constructor-tearoffs
-
// Test the support for errors about type parameters as potentially
// constant expressions or potentially constant type expressions.
diff --git a/tests/language/const/constant_type_variable_test.dart b/tests/language/const/constant_type_variable_test.dart
index b8436a5..ef347d7 100644
--- a/tests/language/const/constant_type_variable_test.dart
+++ b/tests/language/const/constant_type_variable_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=constructor-tearoffs
-
// Test the support for type parameters as potentially constant expressions
// and potentially constant type expressions. The cast to dynamic is included
// in order to avoid a diagnostic message about an unnecessary cast.
diff --git a/tests/language/const/instantiated_function_constant_error_test.dart b/tests/language/const/instantiated_function_constant_error_test.dart
index 91b5ec4..f1dd485 100644
--- a/tests/language/const/instantiated_function_constant_error_test.dart
+++ b/tests/language/const/instantiated_function_constant_error_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=constructor-tearoffs
-
// Test the support for error detection with generic function instantiation
// expressions that are constant or potentially constant. Include both some
// explicit generic function instantiations, and some implicit ones (for the
diff --git a/tests/language/const/instantiated_function_constant_test.dart b/tests/language/const/instantiated_function_constant_test.dart
index b86f99d..3d5619c 100644
--- a/tests/language/const/instantiated_function_constant_test.dart
+++ b/tests/language/const/instantiated_function_constant_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=constructor-tearoffs
-
// Test the support for generic function instantiation with constant and
// potentially constant expressions. Include both some explicit generic
// function instantiations, and some implicit ones (for the latter, the type
diff --git a/tests/language/constructor/explicit_instantiation_syntax_test.dart b/tests/language/constructor/explicit_instantiation_syntax_test.dart
index 387da72..345b472 100644
--- a/tests/language/constructor/explicit_instantiation_syntax_test.dart
+++ b/tests/language/constructor/explicit_instantiation_syntax_test.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=constructor-tearoffs
+
import 'dart:core' hide dynamic;
import 'dart:core' as core show dynamic;
diff --git a/tests/language/constructor/tear_off_test.dart b/tests/language/constructor/tear_off_test.dart
index f70127d..ce7144d 100644
--- a/tests/language/constructor/tear_off_test.dart
+++ b/tests/language/constructor/tear_off_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=constructor-tearoffs
-
import "package:expect/expect.dart";
import "../static_type_helper.dart";
@@ -91,23 +89,23 @@
GGen<int>.new.expectStaticType<Exactly<GGen<int> Function(int)>>();
GGen<int>.named.expectStaticType<Exactly<GGen<int> Function(int)>>();
- GGenRedir<int>.new
- .expectStaticType<Exactly<GGenRedir<int> Function(int)>>();
- GGenRedir<int>.named
+ GGenRedir<int>.new.expectStaticType<Exactly<GGenRedir<int> Function(int)>>();
+ GGenRedir<int>
+ .named
.expectStaticType<Exactly<GGenRedir<int> Function(int)>>();
GFac<int>.new.expectStaticType<Exactly<GFac<int> Function(int)>>();
GFac<int>.named.expectStaticType<Exactly<GFac<int> Function(int)>>();
- GFacRedir<int>.new
- .expectStaticType<Exactly<GFacRedir<int> Function(int)>>();
- GFacRedir<int>.named
+ GFacRedir<int>.new.expectStaticType<Exactly<GFacRedir<int> Function(int)>>();
+ GFacRedir<int>
+ .named
.expectStaticType<Exactly<GFacRedir<int> Function(int)>>();
context<GGen<int> Function(int)>(
GGen.new..expectStaticType<Exactly<GGen<int> Function(int)>>());
context<GGen<int> Function(int)>(
GGen.named..expectStaticType<Exactly<GGen<int> Function(int)>>());
- context<GGenRedir<int> Function(int)>(GGenRedir.new
- ..expectStaticType<Exactly<GGenRedir<int> Function(int)>>());
+ context<GGenRedir<int> Function(int)>(
+ GGenRedir.new..expectStaticType<Exactly<GGenRedir<int> Function(int)>>());
context<GGenRedir<int> Function(int)>(GGenRedir.named
..expectStaticType<Exactly<GGenRedir<int> Function(int)>>());
context<GFac<int> Function(int)>(
@@ -156,15 +154,13 @@
// Generic class constructors torn off with explicit instantiation
// to constant type.
- test<GGen<int> Function(int)>(
- GGen<int>.new, GGen<int>.new, GGen<int>.named);
+ test<GGen<int> Function(int)>(GGen<int>.new, GGen<int>.new, GGen<int>.named);
test<GGen<int> Function(int)>(GGen<int>.named, GGen<int>.named);
test<GGenRedir<int> Function(int)>(
GGenRedir<int>.new, GGenRedir<int>.new, GGenRedir<int>.named);
test<GGenRedir<int> Function(int)>(
GGenRedir<int>.named, GGenRedir<int>.named);
- test<GFac<int> Function(int)>(
- GFac<int>.new, GFac<int>.new, GFac<int>.named);
+ test<GFac<int> Function(int)>(GFac<int>.new, GFac<int>.new, GFac<int>.named);
test<GFac<int> Function(int)>(GFac<int>.named, GFac<int>.named);
test<GFacRedir<int> Function(int)>(
GFacRedir<int>.new, GFacRedir<int>.new, GFacRedir<int>.named);
diff --git a/tests/language/constructor/unnamed_new_error_test.dart b/tests/language/constructor/unnamed_new_error_test.dart
index 0fec8bf..c44904b 100644
--- a/tests/language/constructor/unnamed_new_error_test.dart
+++ b/tests/language/constructor/unnamed_new_error_test.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=constructor-tearoffs
+
import "package:expect/expect.dart";
diff --git a/tests/language/constructor/unnamed_new_test.dart b/tests/language/constructor/unnamed_new_test.dart
index a0ced5a6..e6ca31d 100644
--- a/tests/language/constructor/unnamed_new_test.dart
+++ b/tests/language/constructor/unnamed_new_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=constructor-tearoffs
-
import "package:expect/expect.dart";
import "unnamed_new_test.dart" as prefix;
diff --git a/tests/language/explicit_type_instantiation_parsing_test.dart b/tests/language/explicit_type_instantiation_parsing_test.dart
index a7c748c..47b58d1 100644
--- a/tests/language/explicit_type_instantiation_parsing_test.dart
+++ b/tests/language/explicit_type_instantiation_parsing_test.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=constructor-tearoffs
+
// Test parsing around ambiguities in grammar for explicit type instantiation.
//
diff --git a/tests/language/generic_methods/explicit_instantiated_tearoff_test.dart b/tests/language/generic_methods/explicit_instantiated_tearoff_test.dart
index 8028216..5cfd181 100644
--- a/tests/language/generic_methods/explicit_instantiated_tearoff_test.dart
+++ b/tests/language/generic_methods/explicit_instantiated_tearoff_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=constructor-tearoffs
-
import "package:expect/expect.dart";
import "../static_type_helper.dart";
@@ -19,11 +17,11 @@
void tearOffsOnThis() {
const staticTearOff = staticMethod<int, String>;
staticMethod<int, String>
- .expectStaticType<Exactly<int Function(String, [String?])>>();
+ .expectStaticType<Exactly<int Function(String, [String?])>>();
instanceMethod<int, String>
- .expectStaticType<Exactly<int Function(String, [String?])>>();
+ .expectStaticType<Exactly<int Function(String, [String?])>>();
this.instanceMethod<int, String>
- .expectStaticType<Exactly<int Function(String, [String?])>>();
+ .expectStaticType<Exactly<int Function(String, [String?])>>();
Expect.identical(staticMethod<int, String>, staticTearOff);
@@ -39,16 +37,15 @@
void mixinTearOffsOnThis() {
const staticTearOff = staticMethod<int, String>;
staticMethod<int, String>
- .expectStaticType<Exactly<int Function(String, [String?])>>();
+ .expectStaticType<Exactly<int Function(String, [String?])>>();
mixinInstanceMethod<int, String>
- .expectStaticType<Exactly<int Function(String, [String?])>>();
+ .expectStaticType<Exactly<int Function(String, [String?])>>();
this.mixinInstanceMethod<int, String>
- .expectStaticType<Exactly<int Function(String, [String?])>>();
+ .expectStaticType<Exactly<int Function(String, [String?])>>();
Expect.identical(staticMethod<int, String>, staticTearOff);
- Expect.equals(
- mixinInstanceMethod<int, String>,
+ Expect.equals(mixinInstanceMethod<int, String>,
this.mixinInstanceMethod<int, String>);
}
}
@@ -60,11 +57,11 @@
void extensionTearOffsOnThis() {
const staticTearOff = staticMethod<int, String>;
staticMethod<int, String>
- .expectStaticType<Exactly<int Function(String, [String?])>>();
+ .expectStaticType<Exactly<int Function(String, [String?])>>();
extInstanceMethod<int, String>
- .expectStaticType<Exactly<int Function(String, [String?])>>();
+ .expectStaticType<Exactly<int Function(String, [String?])>>();
this.extInstanceMethod<int, String>
- .expectStaticType<Exactly<int Function(String, [String?])>>();
+ .expectStaticType<Exactly<int Function(String, [String?])>>();
Expect.identical(staticMethod<int, String>, staticTearOff);
// Extension instance methods do not specify equality.
}
@@ -73,7 +70,7 @@
class D extends C with M {
void tearOffsOnSuper() {
super.instanceMethod<int, String>
- .expectStaticType<Exactly<int Function(String, [String?])>>();
+ .expectStaticType<Exactly<int Function(String, [String?])>>();
Expect.equals(
super.instanceMethod<int, String>, super.instanceMethod<int, String>);
}
@@ -93,23 +90,17 @@
toplevel<int, String>
.expectStaticType<Exactly<int Function(String, [String?])>>();
- C
- .staticMethod<int, String>
+ C.staticMethod<int, String>
.expectStaticType<Exactly<int Function(String, [String?])>>();
- M
- .staticMethod<int, String>
+ M.staticMethod<int, String>
.expectStaticType<Exactly<int Function(String, [String?])>>();
- E
- .staticMethod<int, String>
+ E.staticMethod<int, String>
.expectStaticType<Exactly<int Function(String, [String?])>>();
- o
- .instanceMethod<int, String>
+ o.instanceMethod<int, String>
.expectStaticType<Exactly<int Function(String, [String?])>>();
- o
- .mixinInstanceMethod<int, String>
+ o.mixinInstanceMethod<int, String>
.expectStaticType<Exactly<int Function(String, [String?])>>();
- o
- .extInstanceMethod<int, String>
+ o.extInstanceMethod<int, String>
.expectStaticType<Exactly<int Function(String, [String?])>>();
local<int, String>
.expectStaticType<Exactly<int Function(String, [String?])>>();
@@ -125,8 +116,7 @@
// But not for instance method tear-off.
// Specification requires equality.
- Expect.equals(
- o.instanceMethod<int, String>, o.instanceMethod<int, String>);
+ Expect.equals(o.instanceMethod<int, String>, o.instanceMethod<int, String>);
Expect.equals(
o.mixinInstanceMethod<int, String>, o.mixinInstanceMethod<int, String>);
@@ -134,8 +124,7 @@
// And not canonicalized where they shouldn't (different types).
Expect.notEquals(toplevel<int, String>, toplevel<num, String>);
- Expect.notEquals(
- C.staticMethod<int, String>, C.staticMethod<num, String>);
+ Expect.notEquals(C.staticMethod<int, String>, C.staticMethod<num, String>);
Expect.notEquals(local<int, String>, local<num, String>);
Expect.notEquals(
o.instanceMethod<int, String>, o.instanceMethod<num, String>);
diff --git a/tests/language/nnbd/flow_analysis/local_boolean_implicitly_typed_new_test.dart b/tests/language/nnbd/flow_analysis/local_boolean_implicitly_typed_new_test.dart
index 5fd4721..343064a 100644
--- a/tests/language/nnbd/flow_analysis/local_boolean_implicitly_typed_new_test.dart
+++ b/tests/language/nnbd/flow_analysis/local_boolean_implicitly_typed_new_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=constructor-tearoffs
-
import '../../static_type_helper.dart';
// This test checks whether a local boolean variable can be used to perform type
diff --git a/tests/language/type_object/explicit_instantiated_type_literal_error_test.dart b/tests/language/type_object/explicit_instantiated_type_literal_error_test.dart
index af49363..804a291 100644
--- a/tests/language/type_object/explicit_instantiated_type_literal_error_test.dart
+++ b/tests/language/type_object/explicit_instantiated_type_literal_error_test.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=constructor-tearoffs
+
// Tests that explicitly instantiated type objects only work
// when instantiated correctly.
diff --git a/tests/language/type_object/explicit_instantiated_type_literal_test.dart b/tests/language/type_object/explicit_instantiated_type_literal_test.dart
index 5d036e6..ff9e7d3 100644
--- a/tests/language/type_object/explicit_instantiated_type_literal_test.dart
+++ b/tests/language/type_object/explicit_instantiated_type_literal_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=constructor-tearoffs
-
import "package:expect/expect.dart";
import "../static_type_helper.dart";
diff --git a/tests/language/typedef/aliased_constructor_tear_off_test.dart b/tests/language/typedef/aliased_constructor_tear_off_test.dart
index 9adb357..f4feb9f 100644
--- a/tests/language/typedef/aliased_constructor_tear_off_test.dart
+++ b/tests/language/typedef/aliased_constructor_tear_off_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=constructor-tearoffs
-
// Tests that constructor tear-offs from type aliases work and
// are canonicalized correctly
@@ -115,15 +113,15 @@
context<C<int> Function(int)>(
Bounded.named..expectStaticType<Exactly<C<int> Function(int)>>());
- context<C<C<int>> Function(C<int>)>(Wrapping.new
- ..expectStaticType<Exactly<C<C<int>> Function(C<int>)>>());
- context<C<C<int>> Function(C<int>)>(Wrapping.named
- ..expectStaticType<Exactly<C<C<int>> Function(C<int>)>>());
+ context<C<C<int>> Function(C<int>)>(
+ Wrapping.new..expectStaticType<Exactly<C<C<int>> Function(C<int>)>>());
+ context<C<C<int>> Function(C<int>)>(
+ Wrapping.named..expectStaticType<Exactly<C<C<int>> Function(C<int>)>>());
- context<C<int> Function(int)>(Extra.new
- ..expectStaticType<Exactly<C<int> Function(int)>>());
- context<C<int> Function(int)>(Extra.named
- ..expectStaticType<Exactly<C<int> Function(int)>>());
+ context<C<int> Function(int)>(
+ Extra.new..expectStaticType<Exactly<C<int> Function(int)>>());
+ context<C<int> Function(int)>(
+ Extra.named..expectStaticType<Exactly<C<int> Function(int)>>());
// Uninstantiated tear-offs always canonicalize.
Expect.identical(Direct.new, Direct.new);
diff --git a/tests/language/typedef/aliased_type_literal_instantiation_test.dart b/tests/language/typedef/aliased_type_literal_instantiation_test.dart
index d30640f..74b0fa9 100644
--- a/tests/language/typedef/aliased_type_literal_instantiation_test.dart
+++ b/tests/language/typedef/aliased_type_literal_instantiation_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=constructor-tearoffs
-
// Tests that type literals made from type aliases work and
// are canonicalized correctly