[cfe] Remove language version from test data
Change-Id: I2288a4fd1fa93044436f161f07b9b3fb7ea441f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250847
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
diff --git a/pkg/front_end/test/analyser_ignored/load_dill_twice_lib_1.dart b/pkg/front_end/test/analyser_ignored/load_dill_twice_lib_1.dart
index 443c3b5..ca76918 100644
--- a/pkg/front_end/test/analyser_ignored/load_dill_twice_lib_1.dart
+++ b/pkg/front_end/test/analyser_ignored/load_dill_twice_lib_1.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.
-// @dart = 2.9
-
export 'load_dill_twice_lib_2.dart';
// Use annotation to force proper printing.
diff --git a/pkg/front_end/test/analyser_ignored/load_dill_twice_lib_2.dart b/pkg/front_end/test/analyser_ignored/load_dill_twice_lib_2.dart
index 0ba97dd..5e9d38a 100644
--- a/pkg/front_end/test/analyser_ignored/load_dill_twice_lib_2.dart
+++ b/pkg/front_end/test/analyser_ignored/load_dill_twice_lib_2.dart
@@ -2,6 +2,4 @@
// 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.
-// @dart = 2.9
-
int foo() => 42;
diff --git a/pkg/front_end/test/covariance_check/data/field.dart b/pkg/front_end/test/covariance_check/data/field.dart
index 743548d..f44a638 100644
--- a/pkg/front_end/test/covariance_check/data/field.dart
+++ b/pkg/front_end/test/covariance_check/data/field.dart
@@ -2,14 +2,16 @@
// 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.
-// @dart = 2.9
-
class Class<T> {
+ T get value => throw '';
T direct;
void Function(T) functionArgument;
T Function() functionReturn;
T Function(T) functionArgumentReturn;
+ Class(this.direct, this.functionArgument, this.functionReturn,
+ this.functionArgumentReturn);
+
void method(Class<T> other) {
direct;
this.direct;
@@ -17,11 +19,11 @@
functionArgument;
this.functionArgument;
- other. /*as: void Function(T)*/ functionArgument;
+ other. /*as: void Function(T%)!*/ functionArgument;
- functionArgument(null);
- this.functionArgument(null);
- other. /*as: void Function(T)*/ functionArgument(null);
+ functionArgument(value);
+ this.functionArgument(value);
+ other. /*as: void Function(T%)!*/ functionArgument(value);
functionReturn;
this.functionReturn;
@@ -33,10 +35,10 @@
functionArgumentReturn;
this.functionArgumentReturn;
- other. /*as: T Function(T)*/ functionArgumentReturn;
+ other. /*as: T% Function(T%)!*/ functionArgumentReturn;
- functionArgumentReturn(null);
- this.functionArgumentReturn(null);
- other. /*as: T Function(T)*/ functionArgumentReturn(null);
+ functionArgumentReturn(value);
+ this.functionArgumentReturn(value);
+ other. /*as: T% Function(T%)!*/ functionArgumentReturn(value);
}
}
diff --git a/pkg/front_end/test/covariance_check/data/getter.dart b/pkg/front_end/test/covariance_check/data/getter.dart
index 95d8e1a..6d64717 100644
--- a/pkg/front_end/test/covariance_check/data/getter.dart
+++ b/pkg/front_end/test/covariance_check/data/getter.dart
@@ -2,13 +2,12 @@
// 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.
-// @dart = 2.9
-
class Class<T> {
- T get direct => null;
- void Function(T) get functionArgument => null;
- T Function() get functionReturn => null;
- T Function(T) get functionArgumentReturn => null;
+ T get value => throw '';
+ T get direct => value;
+ void Function(T) get functionArgument => throw '';
+ T Function() get functionReturn => throw '';
+ T Function(T) get functionArgumentReturn => throw '';
void method(Class<T> other) {
direct;
@@ -17,11 +16,11 @@
functionArgument;
this.functionArgument;
- other. /*as: void Function(T)*/ functionArgument;
+ other. /*as: void Function(T%)!*/ functionArgument;
- functionArgument(null);
- this.functionArgument(null);
- other. /*as: void Function(T)*/ functionArgument(null);
+ functionArgument(value);
+ this.functionArgument(value);
+ other. /*as: void Function(T%)!*/ functionArgument(value);
functionReturn;
this.functionReturn;
@@ -33,10 +32,10 @@
functionArgumentReturn;
this.functionArgumentReturn;
- other. /*as: T Function(T)*/ functionArgumentReturn;
+ other. /*as: T% Function(T%)!*/ functionArgumentReturn;
- functionArgumentReturn(null);
- this.functionArgumentReturn(null);
- other. /*as: T Function(T)*/ functionArgumentReturn(null);
+ functionArgumentReturn(value);
+ this.functionArgumentReturn(value);
+ other. /*as: T% Function(T%)!*/ functionArgumentReturn(value);
}
}
diff --git a/pkg/front_end/test/covariance_check/data/method.dart b/pkg/front_end/test/covariance_check/data/method.dart
index 91bb44f..7f27f0f 100644
--- a/pkg/front_end/test/covariance_check/data/method.dart
+++ b/pkg/front_end/test/covariance_check/data/method.dart
@@ -2,13 +2,12 @@
// 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.
-// @dart = 2.9
-
class Class<T> {
- T direct() => null;
- void Function(T) functionArgument() => null;
- T Function() functionReturn() => null;
- T Function(T) functionArgumentReturn() => null;
+ T get value => throw '';
+ T direct() => value;
+ void Function(T) functionArgument() => throw '';
+ T Function() functionReturn() => throw '';
+ T Function(T) functionArgumentReturn() => throw '';
void method(Class<T> other) {
direct;
@@ -21,15 +20,15 @@
functionArgument;
this.functionArgument;
- other. /*as: void Function(T) Function()*/ functionArgument;
+ other. /*as: void Function(T%)! Function()!*/ functionArgument;
functionArgument();
this.functionArgument();
- other. /*as: void Function(T)*/ functionArgument();
+ other. /*as: void Function(T%)!*/ functionArgument();
- functionArgument()(null);
- this.functionArgument()(null);
- other. /*as: void Function(T)*/ functionArgument()(null);
+ functionArgument()(value);
+ this.functionArgument()(value);
+ other. /*as: void Function(T%)!*/ functionArgument()(value);
functionReturn;
this.functionReturn;
@@ -45,14 +44,14 @@
functionArgumentReturn;
this.functionArgumentReturn;
- other. /*as: T Function(T) Function()*/ functionArgumentReturn;
+ other. /*as: T% Function(T%)! Function()!*/ functionArgumentReturn;
functionArgumentReturn();
this.functionArgumentReturn();
- other. /*as: T Function(T)*/ functionArgumentReturn();
+ other. /*as: T% Function(T%)!*/ functionArgumentReturn();
- functionArgumentReturn()(null);
- this.functionArgumentReturn()(null);
- other. /*as: T Function(T)*/ functionArgumentReturn()(null);
+ functionArgumentReturn()(value);
+ this.functionArgumentReturn()(value);
+ other. /*as: T% Function(T%)!*/ functionArgumentReturn()(value);
}
}
diff --git a/pkg/front_end/test/extensions/data/ambiguous/lib1.dart b/pkg/front_end/test/extensions/data/ambiguous/lib1.dart
index d2ec93e..0ee1710 100644
--- a/pkg/front_end/test/extensions/data/ambiguous/lib1.dart
+++ b/pkg/front_end/test/extensions/data/ambiguous/lib1.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.
-// @dart = 2.9
-
/*library: scope=[
AmbiguousExtension1,
AmbiguousExtension2,
@@ -18,7 +16,7 @@
extension-members=[
static ambiguousStaticMethod1=AmbiguousExtension1|ambiguousStaticMethod1],
extension-name=AmbiguousExtension1,
- extension-onType=String
+ extension-onType=String!
*/
extension AmbiguousExtension1 on String {
/*member: AmbiguousExtension1|ambiguousStaticMethod1:
@@ -34,7 +32,7 @@
extension-members=[
static unambiguousStaticMethod1=AmbiguousExtension2|unambiguousStaticMethod1],
extension-name=AmbiguousExtension2,
- extension-onType=String
+ extension-onType=String!
*/
extension AmbiguousExtension2 on String {
/*member: AmbiguousExtension2|unambiguousStaticMethod1:
@@ -50,7 +48,7 @@
extension-members=[
static ambiguousStaticMethod2=UnambiguousExtension1|ambiguousStaticMethod2],
extension-name=UnambiguousExtension1,
- extension-onType=String
+ extension-onType=String!
*/
extension UnambiguousExtension1 on String {
/*member: UnambiguousExtension1|ambiguousStaticMethod2:
diff --git a/pkg/front_end/test/extensions/data/ambiguous/lib2.dart b/pkg/front_end/test/extensions/data/ambiguous/lib2.dart
index 5554fab..882d2fc 100644
--- a/pkg/front_end/test/extensions/data/ambiguous/lib2.dart
+++ b/pkg/front_end/test/extensions/data/ambiguous/lib2.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.
-// @dart = 2.9
-
/*library: scope=[
AmbiguousExtension1,
AmbiguousExtension2,
@@ -18,7 +16,7 @@
extension-members=[
static ambiguousStaticMethod1=AmbiguousExtension1|ambiguousStaticMethod1],
extension-name=AmbiguousExtension1,
- extension-onType=String
+ extension-onType=String!
*/
extension AmbiguousExtension1 on String {
/*member: AmbiguousExtension1|ambiguousStaticMethod1:
@@ -34,7 +32,7 @@
extension-members=[
static unambiguousStaticMethod2=AmbiguousExtension2|unambiguousStaticMethod2],
extension-name=AmbiguousExtension2,
- extension-onType=String
+ extension-onType=String!
*/
extension AmbiguousExtension2 on String {
/*member: AmbiguousExtension2|unambiguousStaticMethod2:
@@ -50,7 +48,7 @@
extension-members=[
static ambiguousStaticMethod2=UnambiguousExtension2|ambiguousStaticMethod2],
extension-name=UnambiguousExtension2,
- extension-onType=String
+ extension-onType=String!
*/
extension UnambiguousExtension2 on String {
/*member: UnambiguousExtension2|ambiguousStaticMethod2:
diff --git a/pkg/front_end/test/extensions/data/ambiguous/main.dart b/pkg/front_end/test/extensions/data/ambiguous/main.dart
index b3032bc..adf03ea 100644
--- a/pkg/front_end/test/extensions/data/ambiguous/main.dart
+++ b/pkg/front_end/test/extensions/data/ambiguous/main.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.
-// @dart = 2.9
-
/*library: scope=[
async.dart.FutureExtensions,
core.dart.EnumByName,
diff --git a/pkg/front_end/test/extensions/data/as_show/lib.dart b/pkg/front_end/test/extensions/data/as_show/lib.dart
index 0f83439..56d26bd 100644
--- a/pkg/front_end/test/extensions/data/as_show/lib.dart
+++ b/pkg/front_end/test/extensions/data/as_show/lib.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.
-// @dart = 2.9
-
/*library: scope=[
Extension1,
async.dart.FutureExtensions,
@@ -17,7 +15,7 @@
method1=Extension1|method1,
tearoff method1=Extension1|get#method1],
extension-name=Extension1,
- extension-onType=int
+ extension-onType=int!
*/
extension Extension1 on int {
/*member: Extension1|method1:
diff --git a/pkg/front_end/test/extensions/data/as_show/main.dart b/pkg/front_end/test/extensions/data/as_show/main.dart
index 6d3e459..47a09d2 100644
--- a/pkg/front_end/test/extensions/data/as_show/main.dart
+++ b/pkg/front_end/test/extensions/data/as_show/main.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.
-// @dart = 2.9
-
/*library: scope=[
async.dart.FutureExtensions,
core.dart.EnumByName,
diff --git a/pkg/front_end/test/extensions/data/as_show/origin.dart b/pkg/front_end/test/extensions/data/as_show/origin.dart
index 3ba1c97..b067a10 100644
--- a/pkg/front_end/test/extensions/data/as_show/origin.dart
+++ b/pkg/front_end/test/extensions/data/as_show/origin.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.
-// @dart = 2.9
-
/*library: scope=[
Extension2,
async.dart.FutureExtensions,
@@ -17,7 +15,7 @@
method2=Extension2|method2,
tearoff method2=Extension2|get#method2],
extension-name=Extension2,
- extension-onType=String
+ extension-onType=String!
*/
extension Extension2 on String {
/*member: Extension2|method2:
diff --git a/pkg/front_end/test/extensions/data/explicit_this.dart b/pkg/front_end/test/extensions/data/explicit_this.dart
index 3fa67bc..8f47acc 100644
--- a/pkg/front_end/test/extensions/data/explicit_this.dart
+++ b/pkg/front_end/test/extensions/data/explicit_this.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.
-// @dart = 2.9
-
/*library: scope=[
A2,
async.dart.FutureExtensions,
@@ -11,7 +9,7 @@
core.dart.EnumName]*/
class A1 {
- Object field;
+ Object? field;
void method1() {}
}
@@ -26,7 +24,7 @@
tearoff method3=A2|get#method3,
tearoff method4=A2|get#method4],
extension-name=A2,
- extension-onType=A1
+ extension-onType=A1!
*/
extension A2 on A1 {
/*member: A2|method2:
@@ -50,7 +48,7 @@
member-name=A2|method3,
member-params=[#this]
*/
- Object method3() => this.field;
+ Object? method3() => this.field;
/*member: A2|get#method3:
builder-name=method3,
@@ -65,7 +63,7 @@
member-name=A2|method4,
member-params=[#this,o]
*/
- void method4(Object o) {
+ void method4(Object? o) {
this.field = o;
}
diff --git a/pkg/front_end/test/extensions/data/export_twice/lib1.dart b/pkg/front_end/test/extensions/data/export_twice/lib1.dart
index 98bceb7..c4d9386 100644
--- a/pkg/front_end/test/extensions/data/export_twice/lib1.dart
+++ b/pkg/front_end/test/extensions/data/export_twice/lib1.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.
-// @dart = 2.9
-
/*library: scope=[
E,
async.dart.FutureExtensions,
@@ -18,7 +16,8 @@
extension-members=[
foo=E|foo,
tearoff foo=E|get#foo],
- extension-name=E,extension-onType=A
+ extension-name=E,
+ extension-onType=A!
*/
extension E on A {
/*member: E|foo:
diff --git a/pkg/front_end/test/extensions/data/export_twice/lib2.dart b/pkg/front_end/test/extensions/data/export_twice/lib2.dart
index 2ec4f6e..c6b5edb 100644
--- a/pkg/front_end/test/extensions/data/export_twice/lib2.dart
+++ b/pkg/front_end/test/extensions/data/export_twice/lib2.dart
@@ -7,6 +7,4 @@
core.dart.EnumByName,
core.dart.EnumName]*/
-// @dart = 2.9
-
export 'lib1.dart' show E;
diff --git a/pkg/front_end/test/extensions/data/export_twice/main.dart b/pkg/front_end/test/extensions/data/export_twice/main.dart
index 50f805b..65aa4a0 100644
--- a/pkg/front_end/test/extensions/data/export_twice/main.dart
+++ b/pkg/front_end/test/extensions/data/export_twice/main.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.
-// @dart = 2.9
-
/*library: scope=[
async.dart.FutureExtensions,
core.dart.EnumByName,
diff --git a/pkg/front_end/test/extensions/data/export_unnamed/lib.dart b/pkg/front_end/test/extensions/data/export_unnamed/lib.dart
index dcba01e..d8f08bf 100644
--- a/pkg/front_end/test/extensions/data/export_unnamed/lib.dart
+++ b/pkg/front_end/test/extensions/data/export_unnamed/lib.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.
-// @dart = 2.9
-
/*library: scope=[
NamedExtension,
_extension#0,
@@ -16,7 +14,7 @@
builder-onType=String,
extension-members=[static staticMethod=_extension#0|staticMethod],
extension-name=_extension#0,
- extension-onType=String
+ extension-onType=String!
*/
extension on String {
/*member: _extension#0|staticMethod:
@@ -31,7 +29,7 @@
builder-onType=String,
extension-members=[static staticMethod=NamedExtension|staticMethod],
extension-name=NamedExtension,
- extension-onType=String
+ extension-onType=String!
*/
extension NamedExtension on String {
/*member: NamedExtension|staticMethod:
diff --git a/pkg/front_end/test/extensions/data/export_unnamed/main.dart b/pkg/front_end/test/extensions/data/export_unnamed/main.dart
index 3eabaef..eafdc7d 100644
--- a/pkg/front_end/test/extensions/data/export_unnamed/main.dart
+++ b/pkg/front_end/test/extensions/data/export_unnamed/main.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.
-// @dart = 2.9
-
/*library: scope=[
async.dart.FutureExtensions,
core.dart.EnumByName,
diff --git a/pkg/front_end/test/extensions/data/extension_on_type_variable.dart b/pkg/front_end/test/extensions/data/extension_on_type_variable.dart
index e40cd1c..baf80b2 100644
--- a/pkg/front_end/test/extensions/data/extension_on_type_variable.dart
+++ b/pkg/front_end/test/extensions/data/extension_on_type_variable.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.
-// @dart = 2.9
-
/*library: scope=[
GeneralGeneric,
async.dart.FutureExtensions,
@@ -18,7 +16,7 @@
method=GeneralGeneric|method,
tearoff method=GeneralGeneric|get#method],
extension-name=GeneralGeneric,
- extension-onType=T,
+ extension-onType=T%,
extension-type-params=[T]
*/
extension GeneralGeneric<T> on T {
diff --git a/pkg/front_end/test/extensions/data/implicit_this.dart b/pkg/front_end/test/extensions/data/implicit_this.dart
index 2dd48a4..a186361 100644
--- a/pkg/front_end/test/extensions/data/implicit_this.dart
+++ b/pkg/front_end/test/extensions/data/implicit_this.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.
-// @dart = 2.9
-
/*library: scope=[
A2,
async.dart.FutureExtensions,
@@ -11,7 +9,7 @@
core.dart.EnumName]*/
class A1 {
- Object field;
+ Object? field;
void method1() {}
}
@@ -26,7 +24,7 @@
tearoff method3=A2|get#method3,
tearoff method4=A2|get#method4],
extension-name=A2,
- extension-onType=A1
+ extension-onType=A1!
*/
extension A2 on A1 {
/*member: A2|method2:
@@ -49,7 +47,7 @@
member-name=A2|method3,
member-params=[#this]
*/
- Object method3() => field;
+ Object? method3() => field;
/*member: A2|get#method3:
builder-name=method3,
@@ -64,7 +62,7 @@
member-name=A2|method4,
member-params=[#this,o]
*/
- void method4(Object o) {
+ void method4(Object? o) {
field = o;
}
diff --git a/pkg/front_end/test/extensions/data/instance_members.dart b/pkg/front_end/test/extensions/data/instance_members.dart
index e7ee05b..10c036b 100644
--- a/pkg/front_end/test/extensions/data/instance_members.dart
+++ b/pkg/front_end/test/extensions/data/instance_members.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.
-// @dart = 2.9
-
/*library: scope=[
A2,
B2,
@@ -26,7 +24,7 @@
tearoff method3=A2|get#method3,
tearoff method4=A2|get#method4],
extension-name=A2,
- extension-onType=A1
+ extension-onType=A1!
*/
extension A2 on A1 {
/*member: A2|method1:
@@ -77,7 +75,7 @@
member-pos-params=[o],
member-type-params=[T]
*/
- A1 method3<T>([T o]) {
+ A1 method3<T>([T? o]) {
print(o);
return this;
}
@@ -101,7 +99,7 @@
member-named-params=[o],
member-type-params=[T]
*/
- A1 method4<T>({T o}) {
+ A1 method4<T>({T? o}) {
print(o);
return this;
}
@@ -128,7 +126,7 @@
tearoff method1=B2|get#method1,
tearoff method2=B2|get#method2],
extension-name=B2,
- extension-onType=B1<T>,
+ extension-onType=B1<T%>!,
extension-type-params=[T]
*/
extension B2<T> on B1<T> {
diff --git a/pkg/front_end/test/extensions/data/named_declarations.dart b/pkg/front_end/test/extensions/data/named_declarations.dart
index c108a11..5c08328 100644
--- a/pkg/front_end/test/extensions/data/named_declarations.dart
+++ b/pkg/front_end/test/extensions/data/named_declarations.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.
-// @dart = 2.9
-
/*library: scope=[
A2,
B2,
@@ -19,7 +17,7 @@
builder-name=A2,
builder-onType=A1,
extension-name=A2,
- extension-onType=A1
+ extension-onType=A1!
*/
extension A2 on A1 {}
@@ -30,7 +28,7 @@
builder-onType=B1<T>,
builder-type-params=[T],
extension-name=B2,
- extension-onType=B1<T>,
+ extension-onType=B1<T%>!,
extension-type-params=[T]
*/
extension B2<T> on B1<T> {}
@@ -39,7 +37,7 @@
builder-name=B3,
builder-onType=B1<A1>,
extension-name=B3,
- extension-onType=B1<A1>
+ extension-onType=B1<A1!>!
*/
extension B3 on B1<A1> {}
@@ -47,8 +45,9 @@
builder-name=B4,
builder-onType=B1<T>,
builder-type-params=[T extends A1],
- extension-name=B4,extension-onType=B1<T>,
- extension-type-params=[T extends A1]
+ extension-name=B4,
+ extension-onType=B1<T!>!,
+ extension-type-params=[T extends A1!]
*/
extension B4<T extends A1> on B1<T> {}
diff --git a/pkg/front_end/test/extensions/data/other_kinds.dart b/pkg/front_end/test/extensions/data/other_kinds.dart
index 38003af..1e1e0a9 100644
--- a/pkg/front_end/test/extensions/data/other_kinds.dart
+++ b/pkg/front_end/test/extensions/data/other_kinds.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.
-// @dart = 2.9
-
/*library: scope=[
A2,
async.dart.FutureExtensions,
@@ -11,7 +9,7 @@
core.dart.EnumName]*/
class A1 {
- int _instanceField;
+ int _instanceField = 0;
int getInstanceField() => _instanceField;
void setInstanceField(int value) {
_instanceField = value;
@@ -27,14 +25,14 @@
builder-name=A2,
builder-onType=A1,
extension-members=[
- operator +=A2|+,
getter instanceProperty=A2|get#instanceProperty,
+ operator +=A2|+,
setter instanceProperty=A2|set#instanceProperty,
static field staticField=A2|staticField,
static getter staticProperty=A2|staticProperty,
static setter staticProperty=A2|staticProperty=],
extension-name=A2,
- extension-onType=A1
+ extension-onType=A1!
*/
extension A2 on A1 {
/*member: A2|get#instanceProperty:
diff --git a/pkg/front_end/test/extensions/data/patching/main.dart b/pkg/front_end/test/extensions/data/patching/main.dart
index c73c1b6..f53b2a1 100644
--- a/pkg/front_end/test/extensions/data/patching/main.dart
+++ b/pkg/front_end/test/extensions/data/patching/main.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.
-// @dart = 2.9
-
/*library: scope=[
async.dart.FutureExtensions,
core.dart.EnumByName,
diff --git a/pkg/front_end/test/extensions/data/patching/origin.dart b/pkg/front_end/test/extensions/data/patching/origin.dart
index ee167d4..34b5cfc 100644
--- a/pkg/front_end/test/extensions/data/patching/origin.dart
+++ b/pkg/front_end/test/extensions/data/patching/origin.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.
-// @dart = 2.9
-
/*library: scope=[
Extension,
GenericExtension,
@@ -24,10 +22,9 @@
static setter staticProperty=Extension|staticProperty=,
static staticMethod=Extension|staticMethod,
tearoff genericInstanceMethod=Extension|get#genericInstanceMethod,
- tearoff instanceMethod=Extension|get#instanceMethod,
- ],
+ tearoff instanceMethod=Extension|get#instanceMethod],
extension-name=Extension,
- extension-onType=String
+ extension-onType=String!
*/
extension Extension on String {
/*member: Extension|get#instanceMethod:
@@ -74,10 +71,9 @@
static setter staticProperty=GenericExtension|staticProperty=,
static staticMethod=GenericExtension|staticMethod,
tearoff genericInstanceMethod=GenericExtension|get#genericInstanceMethod,
- tearoff instanceMethod=GenericExtension|get#instanceMethod
- ],
+ tearoff instanceMethod=GenericExtension|get#instanceMethod],
extension-name=GenericExtension,
- extension-onType=T,
+ extension-onType=T%,
extension-type-params=[T]
*/
extension GenericExtension<T> on T {
diff --git a/pkg/front_end/test/extensions/data/patching/patch.dart b/pkg/front_end/test/extensions/data/patching/patch.dart
index 2f929c7..638ee90a 100644
--- a/pkg/front_end/test/extensions/data/patching/patch.dart
+++ b/pkg/front_end/test/extensions/data/patching/patch.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.
-// @dart = 2.9
-
// ignore: import_internal_library
import 'dart:_internal';
diff --git a/pkg/front_end/test/extensions/data/prefix/lib1.dart b/pkg/front_end/test/extensions/data/prefix/lib1.dart
index 66eef24..19d099a 100644
--- a/pkg/front_end/test/extensions/data/prefix/lib1.dart
+++ b/pkg/front_end/test/extensions/data/prefix/lib1.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.
-// @dart = 2.9
-
/*library: scope=[
HiddenExtension1,
ShownExtension1,
@@ -16,7 +14,7 @@
builder-onType=String,
extension-members=[static staticMethod=ShownExtension1|staticMethod],
extension-name=ShownExtension1,
- extension-onType=String
+ extension-onType=String!
*/
extension ShownExtension1 on String {
/*member: ShownExtension1|staticMethod:
@@ -31,7 +29,7 @@
builder-onType=String,
extension-members=[static staticMethod=HiddenExtension1|staticMethod],
extension-name=HiddenExtension1,
- extension-onType=String
+ extension-onType=String!
*/
extension HiddenExtension1 on String {
/*member: HiddenExtension1|staticMethod:
diff --git a/pkg/front_end/test/extensions/data/prefix/lib2.dart b/pkg/front_end/test/extensions/data/prefix/lib2.dart
index 6bc2749..dae3ef6 100644
--- a/pkg/front_end/test/extensions/data/prefix/lib2.dart
+++ b/pkg/front_end/test/extensions/data/prefix/lib2.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.
-// @dart = 2.9
-
/*library: scope=[
HiddenExtension2,
ShownExtension2,
@@ -16,7 +14,7 @@
builder-onType=String,
extension-members=[static staticMethod=HiddenExtension2|staticMethod],
extension-name=HiddenExtension2,
- extension-onType=String
+ extension-onType=String!
*/
extension HiddenExtension2 on String {
/*member: HiddenExtension2|staticMethod:
@@ -31,7 +29,7 @@
builder-onType=String,
extension-members=[static staticMethod=ShownExtension2|staticMethod],
extension-name=ShownExtension2,
- extension-onType=String
+ extension-onType=String!
*/
extension ShownExtension2 on String {
/*member: ShownExtension2|staticMethod:
diff --git a/pkg/front_end/test/extensions/data/prefix/lib3.dart b/pkg/front_end/test/extensions/data/prefix/lib3.dart
index f56416d..f166d1f 100644
--- a/pkg/front_end/test/extensions/data/prefix/lib3.dart
+++ b/pkg/front_end/test/extensions/data/prefix/lib3.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.
-// @dart = 2.9
-
/*library: scope=[
ShownExtension3,
async.dart.FutureExtensions,
@@ -15,7 +13,7 @@
builder-onType=String,
extension-members=[static staticMethod=ShownExtension3|staticMethod],
extension-name=ShownExtension3,
- extension-onType=String
+ extension-onType=String!
*/
extension ShownExtension3 on String {
/*member: ShownExtension3|staticMethod:
diff --git a/pkg/front_end/test/extensions/data/prefix/main.dart b/pkg/front_end/test/extensions/data/prefix/main.dart
index 05a1e8c..a9f5a9d 100644
--- a/pkg/front_end/test/extensions/data/prefix/main.dart
+++ b/pkg/front_end/test/extensions/data/prefix/main.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.
-// @dart = 2.9
-
/*library: scope=[
async.dart.FutureExtensions,
core.dart.EnumByName,
diff --git a/pkg/front_end/test/extensions/data/reexport/lib.dart b/pkg/front_end/test/extensions/data/reexport/lib.dart
index f9286f6..2b06562 100644
--- a/pkg/front_end/test/extensions/data/reexport/lib.dart
+++ b/pkg/front_end/test/extensions/data/reexport/lib.dart
@@ -7,8 +7,6 @@
core.dart.EnumByName,
core.dart.EnumName]*/
-// @dart = 2.9
-
export 'lib1.dart';
/*error: errors=['ClashingExtension' is exported from both 'org-dartlang-test:///a/b/c/lib1.dart' and 'org-dartlang-test:///a/b/c/lib2.dart'.]*/
export 'lib2.dart';
diff --git a/pkg/front_end/test/extensions/data/reexport/lib1.dart b/pkg/front_end/test/extensions/data/reexport/lib1.dart
index 0e1aef3..cf3ae62 100644
--- a/pkg/front_end/test/extensions/data/reexport/lib1.dart
+++ b/pkg/front_end/test/extensions/data/reexport/lib1.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.
-// @dart = 2.9
-
/*library: scope=[
ClashingExtension,
UniqueExtension1,
@@ -16,7 +14,7 @@
builder-onType=String,
extension-members=[static staticMethod=ClashingExtension|staticMethod],
extension-name=ClashingExtension,
- extension-onType=String
+ extension-onType=String!
*/
extension ClashingExtension on String {
/*member: ClashingExtension|staticMethod:
@@ -32,7 +30,7 @@
builder-onType=String,
extension-members=[static staticMethod=UniqueExtension1|staticMethod],
extension-name=UniqueExtension1,
- extension-onType=String
+ extension-onType=String!
*/
extension UniqueExtension1 on String {
/*member: UniqueExtension1|staticMethod:
diff --git a/pkg/front_end/test/extensions/data/reexport/lib2.dart b/pkg/front_end/test/extensions/data/reexport/lib2.dart
index a6a9289..3059376 100644
--- a/pkg/front_end/test/extensions/data/reexport/lib2.dart
+++ b/pkg/front_end/test/extensions/data/reexport/lib2.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.
-// @dart = 2.9
-
/*library: scope=[
ClashingExtension,
UniqueExtension2,
@@ -16,7 +14,7 @@
builder-onType=String,
extension-members=[static staticMethod=ClashingExtension|staticMethod],
extension-name=ClashingExtension,
- extension-onType=String
+ extension-onType=String!
*/
extension ClashingExtension on String {
/*member: ClashingExtension|staticMethod:
@@ -31,7 +29,7 @@
builder-onType=String,
extension-members=[static staticMethod=UniqueExtension2|staticMethod],
extension-name=UniqueExtension2,
- extension-onType=String
+ extension-onType=String!
*/
extension UniqueExtension2 on String {
/*member: UniqueExtension2|staticMethod:
diff --git a/pkg/front_end/test/extensions/data/reexport/main.dart b/pkg/front_end/test/extensions/data/reexport/main.dart
index cec1552..1dfe0ae 100644
--- a/pkg/front_end/test/extensions/data/reexport/main.dart
+++ b/pkg/front_end/test/extensions/data/reexport/main.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.
-// @dart = 2.9
-
/*library: scope=[
async.dart.FutureExtensions,
core.dart.EnumByName,
diff --git a/pkg/front_end/test/extensions/data/show_hide/lib1.dart b/pkg/front_end/test/extensions/data/show_hide/lib1.dart
index 66eef24..19d099a 100644
--- a/pkg/front_end/test/extensions/data/show_hide/lib1.dart
+++ b/pkg/front_end/test/extensions/data/show_hide/lib1.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.
-// @dart = 2.9
-
/*library: scope=[
HiddenExtension1,
ShownExtension1,
@@ -16,7 +14,7 @@
builder-onType=String,
extension-members=[static staticMethod=ShownExtension1|staticMethod],
extension-name=ShownExtension1,
- extension-onType=String
+ extension-onType=String!
*/
extension ShownExtension1 on String {
/*member: ShownExtension1|staticMethod:
@@ -31,7 +29,7 @@
builder-onType=String,
extension-members=[static staticMethod=HiddenExtension1|staticMethod],
extension-name=HiddenExtension1,
- extension-onType=String
+ extension-onType=String!
*/
extension HiddenExtension1 on String {
/*member: HiddenExtension1|staticMethod:
diff --git a/pkg/front_end/test/extensions/data/show_hide/lib2.dart b/pkg/front_end/test/extensions/data/show_hide/lib2.dart
index 6bc2749..dae3ef6 100644
--- a/pkg/front_end/test/extensions/data/show_hide/lib2.dart
+++ b/pkg/front_end/test/extensions/data/show_hide/lib2.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.
-// @dart = 2.9
-
/*library: scope=[
HiddenExtension2,
ShownExtension2,
@@ -16,7 +14,7 @@
builder-onType=String,
extension-members=[static staticMethod=HiddenExtension2|staticMethod],
extension-name=HiddenExtension2,
- extension-onType=String
+ extension-onType=String!
*/
extension HiddenExtension2 on String {
/*member: HiddenExtension2|staticMethod:
@@ -31,7 +29,7 @@
builder-onType=String,
extension-members=[static staticMethod=ShownExtension2|staticMethod],
extension-name=ShownExtension2,
- extension-onType=String
+ extension-onType=String!
*/
extension ShownExtension2 on String {
/*member: ShownExtension2|staticMethod:
diff --git a/pkg/front_end/test/extensions/data/show_hide/main.dart b/pkg/front_end/test/extensions/data/show_hide/main.dart
index 470c0ca..c137caa 100644
--- a/pkg/front_end/test/extensions/data/show_hide/main.dart
+++ b/pkg/front_end/test/extensions/data/show_hide/main.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.
-// @dart = 2.9
-
/*library: scope=[
async.dart.FutureExtensions,
core.dart.EnumByName,
diff --git a/pkg/front_end/test/extensions/data/static_members.dart b/pkg/front_end/test/extensions/data/static_members.dart
index 0796bc8..4f0a7b1 100644
--- a/pkg/front_end/test/extensions/data/static_members.dart
+++ b/pkg/front_end/test/extensions/data/static_members.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.
-// @dart = 2.9
-
/*library: scope=[
A2,
B2,
@@ -19,7 +17,8 @@
extension-members=[
static method1=A2|method1,
static method2=A2|method2],
- extension-name=A2,extension-onType=A1
+ extension-name=A2,
+ extension-onType=A1!
*/
extension A2 on A1 {
/*member: A2|method1:
@@ -51,7 +50,7 @@
static method1=B2|method1,
static method2=B2|method2],
extension-name=B2,
- extension-onType=B1<T>,
+ extension-onType=B1<T%>!,
extension-type-params=[T]
*/
extension B2<T> on B1<T> {
diff --git a/pkg/front_end/test/extensions/data/super.dart b/pkg/front_end/test/extensions/data/super.dart
index e01d659..3e96943 100644
--- a/pkg/front_end/test/extensions/data/super.dart
+++ b/pkg/front_end/test/extensions/data/super.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.
-// @dart = 2.9
-
/*library: scope=[
A2,
async.dart.FutureExtensions,
@@ -21,7 +19,7 @@
method2=A2|method2,
tearoff method2=A2|get#method2],
extension-name=A2,
- extension-onType=A1
+ extension-onType=A1!
*/
extension A2 on A1 {
/*member: A2|method2:
diff --git a/pkg/front_end/test/extensions/data/type_variables.dart b/pkg/front_end/test/extensions/data/type_variables.dart
index 26c0198..296775d 100644
--- a/pkg/front_end/test/extensions/data/type_variables.dart
+++ b/pkg/front_end/test/extensions/data/type_variables.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.
-// @dart = 2.9
-
/*library: scope=[
A2,
A3,
@@ -24,17 +22,21 @@
tearoff method1=A2|get#method1,
tearoff method2=A2|get#method2],
extension-name=A2,
- extension-onType=A1<T>,
+ extension-onType=A1<T%>!,
extension-type-params=[T]
*/
extension A2<T> on A1<T> {
/*member: A2|method1:
- builder-name=method1,
- builder-params=[#this],
- builder-type-params=[T,S extends T],
- member-name=A2|method1,
- member-params=[#this],
- member-type-params=[T,S extends T]
+ builder-name=method1,
+ builder-params=[#this],
+ builder-type-params=[
+ T,
+ S extends T],
+ member-name=A2|method1,
+ member-params=[#this],
+ member-type-params=[
+ T,
+ S extends T%]
*/
A1<T> method1<S extends T>() {
return this;
@@ -50,12 +52,20 @@
*/
/*member: A2|method2:
- builder-name=method2,
- builder-params=[#this,o],
- builder-type-params=[T,S extends A1<T>],
- member-name=A2|method2,
- member-params=[#this,o],
- member-type-params=[T,S extends A1<T>]
+ builder-name=method2,
+ builder-params=[
+ #this,
+ o],
+ builder-type-params=[
+ T,
+ S extends A1<T>],
+ member-name=A2|method2,
+ member-params=[
+ #this,
+ o],
+ member-type-params=[
+ T,
+ S extends A1<T%>!]
*/
A1<T> method2<S extends A1<T>>(S o) {
print(o);
@@ -77,8 +87,8 @@
builder-onType=A1<T>,
builder-type-params=[T extends A1<T>],
extension-name=A3,
- extension-onType=A1<T>,
- extension-type-params=[T extends A1<T>]
+ extension-onType=A1<T!>!,
+ extension-type-params=[T extends A1<T!>!]
*/
extension A3<T extends A1<T>> on A1<T> {
}
@@ -91,7 +101,7 @@
method=A4|method,
tearoff method=A4|get#method],
extension-name=A4,
- extension-onType=A1<T>,
+ extension-onType=A1<T%>!,
extension-type-params=[T]
*/
extension A4<T> on A1<T> {
diff --git a/pkg/front_end/test/extensions/data/unnamed_declarations.dart b/pkg/front_end/test/extensions/data/unnamed_declarations.dart
index df8a014..8c5d73f 100644
--- a/pkg/front_end/test/extensions/data/unnamed_declarations.dart
+++ b/pkg/front_end/test/extensions/data/unnamed_declarations.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.
-// @dart = 2.9
-
/*library: scope=[
_extension#0,
_extension#1,
@@ -23,7 +21,7 @@
method=_extension#0|method,
tearoff method=_extension#0|get#method],
extension-name=_extension#0,
- extension-onType=A1
+ extension-onType=A1!
*/
extension on A1 {
/*member: _extension#0|method:
@@ -49,7 +47,7 @@
method=_extension#1|method,
tearoff method=_extension#1|get#method],
extension-name=_extension#1,
- extension-onType=A1
+ extension-onType=A1!
*/
extension on A1 {
/*member: _extension#1|method:
@@ -78,7 +76,7 @@
method=_extension#2|method,
tearoff method=_extension#2|get#method],
extension-name=_extension#2,
- extension-onType=B1<T>,
+ extension-onType=B1<T%>!,
extension-type-params=[T]
*/
extension <T> on B1<T> {
@@ -109,7 +107,7 @@
method=_extension#3|method,
tearoff method=_extension#3|get#method],
extension-name=_extension#3,
- extension-onType=B1<A1>
+ extension-onType=B1<A1!>!
*/
extension on B1<A1> {
/*member: _extension#3|method:
@@ -136,17 +134,17 @@
method=_extension#4|method,
tearoff method=_extension#4|get#method],
extension-name=_extension#4,
- extension-onType=B1<T>,
- extension-type-params=[T extends A1]
+ extension-onType=B1<T!>!,
+ extension-type-params=[T extends A1!]
*/
extension <T extends A1> on B1<T> {
/*member: _extension#4|method:
- builder-name=method,
- builder-params=[#this],
- builder-type-params=[T extends A1],
- member-name=_extension#4|method,
- member-params=[#this],
- member-type-params=[T extends A1]
+ builder-name=method,
+ builder-params=[#this],
+ builder-type-params=[T extends A1],
+ member-name=_extension#4|method,
+ member-params=[#this],
+ member-type-params=[T extends A1!]
*/
method() {}
@@ -156,7 +154,7 @@
builder-type-params=[T extends A1],
member-name=_extension#4|get#method,
member-params=[#this],
- member-type-params=[T extends A1]
+ member-type-params=[T extends A1!]
*/
}
diff --git a/pkg/front_end/test/extensions/data/use_as_type.dart b/pkg/front_end/test/extensions/data/use_as_type.dart
index 824d8f1..297f763 100644
--- a/pkg/front_end/test/extensions/data/use_as_type.dart
+++ b/pkg/front_end/test/extensions/data/use_as_type.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.
-// @dart = 2.9
-
/*library: scope=[
A2,
B2,
@@ -17,7 +15,7 @@
builder-name=A2,
builder-onType=A1,
extension-name=A2,
- extension-onType=A1
+ extension-onType=A1!
*/
extension A2 on A1 {}
@@ -28,7 +26,7 @@
builder-onType=B1<T>,
builder-type-params=[T],
extension-name=B2,
- extension-onType=B1<T>,
+ extension-onType=B1<T%>!,
extension-type-params=[T]
*/
extension B2<T> on B1<T> {}
@@ -47,6 +45,6 @@
// TODO(johnniwinther): We should report an error on the number of type
// arguments here.
/*error: errors=[This requires the experimental 'extension-types' language feature to be enabled.]*/
-B2<A1> method2() => null;
+B2<A1> method2() => throw '';
-B1</*error: errors=[This requires the experimental 'extension-types' language feature to be enabled.]*/A2> method3() => null;
+B1</*error: errors=[This requires the experimental 'extension-types' language feature to be enabled.]*/A2> method3() => throw '';
diff --git a/pkg/front_end/test/id_testing/data/declarations.dart b/pkg/front_end/test/id_testing/data/declarations.dart
index dfe8054..8f00ad4 100644
--- a/pkg/front_end/test/id_testing/data/declarations.dart
+++ b/pkg/front_end/test/id_testing/data/declarations.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.
-// @dart = 2.7
-
/*library: file=main.dart*/
/*member: main:main*/
diff --git a/pkg/front_end/test/id_testing/data/errors.dart b/pkg/front_end/test/id_testing/data/errors.dart
index c2693b3..e58d6c4 100644
--- a/pkg/front_end/test/id_testing/data/errors.dart
+++ b/pkg/front_end/test/id_testing/data/errors.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.
-// @dart = 2.7
-
/*cfe.library: file=main.dart*/
/*cfe.member: main:main*/
diff --git a/pkg/front_end/test/id_testing/data/library_with_name.dart b/pkg/front_end/test/id_testing/data/library_with_name.dart
index fabca66..cd9b07e 100644
--- a/pkg/front_end/test/id_testing/data/library_with_name.dart
+++ b/pkg/front_end/test/id_testing/data/library_with_name.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.
-// @dart = 2.9
-
/*library: file=main.dart,name=lib*/
library lib;