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>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
f029e837d2
commit
e1428ba911
@@ -31,7 +31,6 @@ runTests(List<String> args, [int shardIndex]) {
|
||||
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);
|
||||
});
|
||||
|
||||
@@ -34,7 +34,6 @@ runTests(List<String> args, [int shardIndex]) {
|
||||
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);
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
--enable-experiment=constructor-tearoffs
|
||||
--force-constructor-tear-off-lowering=0
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
--enable-experiment=constructor-tearoffs
|
||||
--force-constructor-tear-off-lowering
|
||||
--force-constructor-tear-off-lowering
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
|
||||
// @dart=2.15
|
||||
|
||||
// SharedOptions=--enable-experiment=constructor-tearoffs
|
||||
|
||||
import 'package:observatory/service_common.dart';
|
||||
import 'package:test/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.
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 @@ void main() {
|
||||
|
||||
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 @@ void main() {
|
||||
|
||||
// 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);
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
//
|
||||
|
||||
@@ -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 @@ class C {
|
||||
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 @@ mixin M on C {
|
||||
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 @@ extension E on C {
|
||||
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 @@ extension E on C {
|
||||
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 @@ void main() {
|
||||
|
||||
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 @@ void main() {
|
||||
|
||||
// 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 @@ void main() {
|
||||
|
||||
// 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>);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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 @@ void main() {
|
||||
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);
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user