[cfe] Don't override language version of opt-out libraries in strong mode
This change compiles opt-out libraries with opt-out semantics even when
sound null safety was requested. The compile-time error that libraries
cannot opt out with sound null safety is still produces but spurious errors
from interpreting opt-out as opt-in are avoided.
This also aligns the compilation of from-source with from-dill for the
case of opt-out libraries in face of sound null safety.
Closes #43327
Change-Id: I19d659219b7c7b357d15fc5f1ca4415fe1fc4592
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166243
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
index c0d4818..f7492b8 100644
--- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
@@ -477,12 +477,6 @@
} else {
loader.registerStrongOptOutLibrary(this);
}
- _languageVersion = new InvalidLanguageVersion(
- fileUri,
- _languageVersion.charOffset,
- _languageVersion.charCount,
- _languageVersion.isExplicit,
- loader.target.currentSdkVersion);
}
}
_languageVersion.isFinal = true;
diff --git a/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.outline.expect b/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.outline.expect
index 7ddeb49..db00c38 100644
--- a/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.outline.expect
+++ b/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.outline.expect
@@ -34,7 +34,7 @@
static method throws(() → dynamic f, core::String message) → dynamic
;
-library /*isNonNullableByDefault*/;
+library;
//
// Problems in library:
//
@@ -45,5 +45,5 @@
import self as self2;
import "dart:core" as core;
-static method computeInitialValue() → core::int
+static method computeInitialValue() → core::int*
;
diff --git a/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.strong.expect b/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.strong.expect
index 2a73d8e..cc020ed 100644
--- a/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.strong.expect
@@ -21,7 +21,7 @@
: super core::Object::•()
;
static get nonNullableStaticField() → core::int
- return let final core::int? #t1 = self::Class::_#nonNullableStaticField in #t1.==(null) ?{core::int} let final core::int #t2 = (let final core::int #t3 = self::Class::nonNullableStaticFieldReads in let final core::int #t4 = self::Class::nonNullableStaticFieldReads = #t3.{core::num::+}(1) in #t3).{core::num::==}(0) ?{core::int} self::Class::nonNullableStaticField : ini::computeInitialValue() in self::Class::_#nonNullableStaticField.==(null) ?{core::int} self::Class::_#nonNullableStaticField = #t2 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableStaticField' has been assigned during initialization.") : #t1{core::int};
+ return let final core::int? #t1 = self::Class::_#nonNullableStaticField in #t1.==(null) ?{core::int} let final core::int #t2 = (let final core::int #t3 = self::Class::nonNullableStaticFieldReads in let final core::int #t4 = self::Class::nonNullableStaticFieldReads = #t3.{core::num::+}(1) in #t3).{core::num::==}(0) ?{core::int*} self::Class::nonNullableStaticField : ini::computeInitialValue() in self::Class::_#nonNullableStaticField.==(null) ?{core::int} self::Class::_#nonNullableStaticField = #t2 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableStaticField' has been assigned during initialization.") : #t1{core::int};
static get nullableStaticField() → core::int? {
if(!self::Class::_#nullableStaticField#isSet) {
final core::int? #t5 = (let final core::int #t6 = self::Class::nullableStaticFieldReads in let final core::int #t7 = self::Class::nullableStaticFieldReads = #t6.{core::num::+}(1) in #t6).{core::num::==}(0) ?{core::int?} self::Class::nullableStaticField : ini::computeInitialValue();
@@ -33,7 +33,7 @@
return self::Class::_#nullableStaticField;
}
get nonNullableInstanceField() → core::int
- return let final core::int? #t8 = this.{self::Class::_#Class#nonNullableInstanceField} in #t8.==(null) ?{core::int} let final core::int #t9 = (let final core::int #t10 = this.{self::Class::nonNullableInstanceFieldReads} in let final core::int #t11 = this.{self::Class::nonNullableInstanceFieldReads} = #t10.{core::num::+}(1) in #t10).{core::num::==}(0) ?{core::int} this.{self::Class::nonNullableInstanceField} : ini::computeInitialValue() in this.{self::Class::_#Class#nonNullableInstanceField}.==(null) ?{core::int} this.{self::Class::_#Class#nonNullableInstanceField} = #t9 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableInstanceField' has been assigned during initialization.") : #t8{core::int};
+ return let final core::int? #t8 = this.{self::Class::_#Class#nonNullableInstanceField} in #t8.==(null) ?{core::int} let final core::int #t9 = (let final core::int #t10 = this.{self::Class::nonNullableInstanceFieldReads} in let final core::int #t11 = this.{self::Class::nonNullableInstanceFieldReads} = #t10.{core::num::+}(1) in #t10).{core::num::==}(0) ?{core::int*} this.{self::Class::nonNullableInstanceField} : ini::computeInitialValue() in this.{self::Class::_#Class#nonNullableInstanceField}.==(null) ?{core::int} this.{self::Class::_#Class#nonNullableInstanceField} = #t9 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableInstanceField' has been assigned during initialization.") : #t8{core::int};
get nullableInstanceField() → core::int? {
if(!this.{self::Class::_#Class#nullableInstanceField#isSet}) {
final core::int? #t12 = (let final core::int #t13 = this.{self::Class::nullableInstanceFieldReads} in let final core::int #t14 = this.{self::Class::nullableInstanceFieldReads} = #t13.{core::num::+}(1) in #t13).{core::num::==}(0) ?{core::int?} this.{self::Class::nullableInstanceField} : ini::computeInitialValue();
@@ -51,7 +51,7 @@
static field core::int? _#nullableTopLevelField = null;
static field core::bool _#nullableTopLevelField#isSet = false;
static get nonNullableTopLevelField() → core::int
- return let final core::int? #t15 = self::_#nonNullableTopLevelField in #t15.==(null) ?{core::int} let final core::int #t16 = (let final core::int #t17 = self::nonNullableTopLevelFieldReads in let final core::int #t18 = self::nonNullableTopLevelFieldReads = #t17.{core::num::+}(1) in #t17).{core::num::==}(0) ?{core::int} self::nonNullableTopLevelField : ini::computeInitialValue() in self::_#nonNullableTopLevelField.==(null) ?{core::int} self::_#nonNullableTopLevelField = #t16 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableTopLevelField' has been assigned during initialization.") : #t15{core::int};
+ return let final core::int? #t15 = self::_#nonNullableTopLevelField in #t15.==(null) ?{core::int} let final core::int #t16 = (let final core::int #t17 = self::nonNullableTopLevelFieldReads in let final core::int #t18 = self::nonNullableTopLevelFieldReads = #t17.{core::num::+}(1) in #t17).{core::num::==}(0) ?{core::int*} self::nonNullableTopLevelField : ini::computeInitialValue() in self::_#nonNullableTopLevelField.==(null) ?{core::int} self::_#nonNullableTopLevelField = #t16 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableTopLevelField' has been assigned during initialization.") : #t15{core::int};
static get nullableTopLevelField() → core::int? {
if(!self::_#nullableTopLevelField#isSet) {
final core::int? #t19 = (let final core::int #t20 = self::nullableTopLevelFieldReads in let final core::int #t21 = self::nullableTopLevelFieldReads = #t20.{core::num::+}(1) in #t20).{core::num::==}(0) ?{core::int?} self::nullableTopLevelField : ini::computeInitialValue();
@@ -82,7 +82,7 @@
throw "${message}: ${value}";
}
-library /*isNonNullableByDefault*/;
+library;
//
// Problems in library:
//
@@ -90,14 +90,8 @@
// // @dart=2.8
// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out_lib.dart:7:30: Error: A value of type 'Null' can't be returned from a function with return type 'int'.
-// int computeInitialValue() => null;
-// ^
-//
import self as ini;
import "dart:core" as core;
-static method computeInitialValue() → core::int
- return let final<BottomType> #t22 = invalid-expression "pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out_lib.dart:7:30: Error: A value of type 'Null' can't be returned from a function with return type 'int'.
-int computeInitialValue() => null;
- ^" in null as{TypeError,ForNonNullableByDefault} core::int;
+static method computeInitialValue() → core::int*
+ return null;
diff --git a/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.strong.transformed.expect
index 9c70f2f..cc020ed 100644
--- a/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out.dart.strong.transformed.expect
@@ -21,7 +21,7 @@
: super core::Object::•()
;
static get nonNullableStaticField() → core::int
- return let final core::int? #t1 = self::Class::_#nonNullableStaticField in #t1.==(null) ?{core::int} let final core::int #t2 = (let final core::int #t3 = self::Class::nonNullableStaticFieldReads in let final core::int #t4 = self::Class::nonNullableStaticFieldReads = #t3.{core::num::+}(1) in #t3).{core::num::==}(0) ?{core::int} self::Class::nonNullableStaticField : ini::computeInitialValue() in self::Class::_#nonNullableStaticField.==(null) ?{core::int} self::Class::_#nonNullableStaticField = #t2 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableStaticField' has been assigned during initialization.") : #t1{core::int};
+ return let final core::int? #t1 = self::Class::_#nonNullableStaticField in #t1.==(null) ?{core::int} let final core::int #t2 = (let final core::int #t3 = self::Class::nonNullableStaticFieldReads in let final core::int #t4 = self::Class::nonNullableStaticFieldReads = #t3.{core::num::+}(1) in #t3).{core::num::==}(0) ?{core::int*} self::Class::nonNullableStaticField : ini::computeInitialValue() in self::Class::_#nonNullableStaticField.==(null) ?{core::int} self::Class::_#nonNullableStaticField = #t2 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableStaticField' has been assigned during initialization.") : #t1{core::int};
static get nullableStaticField() → core::int? {
if(!self::Class::_#nullableStaticField#isSet) {
final core::int? #t5 = (let final core::int #t6 = self::Class::nullableStaticFieldReads in let final core::int #t7 = self::Class::nullableStaticFieldReads = #t6.{core::num::+}(1) in #t6).{core::num::==}(0) ?{core::int?} self::Class::nullableStaticField : ini::computeInitialValue();
@@ -33,7 +33,7 @@
return self::Class::_#nullableStaticField;
}
get nonNullableInstanceField() → core::int
- return let final core::int? #t8 = this.{self::Class::_#Class#nonNullableInstanceField} in #t8.==(null) ?{core::int} let final core::int #t9 = (let final core::int #t10 = this.{self::Class::nonNullableInstanceFieldReads} in let final core::int #t11 = this.{self::Class::nonNullableInstanceFieldReads} = #t10.{core::num::+}(1) in #t10).{core::num::==}(0) ?{core::int} this.{self::Class::nonNullableInstanceField} : ini::computeInitialValue() in this.{self::Class::_#Class#nonNullableInstanceField}.==(null) ?{core::int} this.{self::Class::_#Class#nonNullableInstanceField} = #t9 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableInstanceField' has been assigned during initialization.") : #t8{core::int};
+ return let final core::int? #t8 = this.{self::Class::_#Class#nonNullableInstanceField} in #t8.==(null) ?{core::int} let final core::int #t9 = (let final core::int #t10 = this.{self::Class::nonNullableInstanceFieldReads} in let final core::int #t11 = this.{self::Class::nonNullableInstanceFieldReads} = #t10.{core::num::+}(1) in #t10).{core::num::==}(0) ?{core::int*} this.{self::Class::nonNullableInstanceField} : ini::computeInitialValue() in this.{self::Class::_#Class#nonNullableInstanceField}.==(null) ?{core::int} this.{self::Class::_#Class#nonNullableInstanceField} = #t9 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableInstanceField' has been assigned during initialization.") : #t8{core::int};
get nullableInstanceField() → core::int? {
if(!this.{self::Class::_#Class#nullableInstanceField#isSet}) {
final core::int? #t12 = (let final core::int #t13 = this.{self::Class::nullableInstanceFieldReads} in let final core::int #t14 = this.{self::Class::nullableInstanceFieldReads} = #t13.{core::num::+}(1) in #t13).{core::num::==}(0) ?{core::int?} this.{self::Class::nullableInstanceField} : ini::computeInitialValue();
@@ -51,7 +51,7 @@
static field core::int? _#nullableTopLevelField = null;
static field core::bool _#nullableTopLevelField#isSet = false;
static get nonNullableTopLevelField() → core::int
- return let final core::int? #t15 = self::_#nonNullableTopLevelField in #t15.==(null) ?{core::int} let final core::int #t16 = (let final core::int #t17 = self::nonNullableTopLevelFieldReads in let final core::int #t18 = self::nonNullableTopLevelFieldReads = #t17.{core::num::+}(1) in #t17).{core::num::==}(0) ?{core::int} self::nonNullableTopLevelField : ini::computeInitialValue() in self::_#nonNullableTopLevelField.==(null) ?{core::int} self::_#nonNullableTopLevelField = #t16 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableTopLevelField' has been assigned during initialization.") : #t15{core::int};
+ return let final core::int? #t15 = self::_#nonNullableTopLevelField in #t15.==(null) ?{core::int} let final core::int #t16 = (let final core::int #t17 = self::nonNullableTopLevelFieldReads in let final core::int #t18 = self::nonNullableTopLevelFieldReads = #t17.{core::num::+}(1) in #t17).{core::num::==}(0) ?{core::int*} self::nonNullableTopLevelField : ini::computeInitialValue() in self::_#nonNullableTopLevelField.==(null) ?{core::int} self::_#nonNullableTopLevelField = #t16 : throw new _in::LateInitializationErrorImpl::•("Field 'nonNullableTopLevelField' has been assigned during initialization.") : #t15{core::int};
static get nullableTopLevelField() → core::int? {
if(!self::_#nullableTopLevelField#isSet) {
final core::int? #t19 = (let final core::int #t20 = self::nullableTopLevelFieldReads in let final core::int #t21 = self::nullableTopLevelFieldReads = #t20.{core::num::+}(1) in #t20).{core::num::==}(0) ?{core::int?} self::nullableTopLevelField : ini::computeInitialValue();
@@ -82,7 +82,7 @@
throw "${message}: ${value}";
}
-library /*isNonNullableByDefault*/;
+library;
//
// Problems in library:
//
@@ -90,21 +90,8 @@
// // @dart=2.8
// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out_lib.dart:7:30: Error: A value of type 'Null' can't be returned from a function with return type 'int'.
-// int computeInitialValue() => null;
-// ^
-//
import self as ini;
import "dart:core" as core;
-static method computeInitialValue() → core::int
- return let final<BottomType> #t22 = invalid-expression "pkg/front_end/testcases/late_lowering/initializer_rewrite_from_opt_out_lib.dart:7:30: Error: A value of type 'Null' can't be returned from a function with return type 'int'.
-int computeInitialValue() => null;
- ^" in let core::Null? #t23 = null in #t23.==(null) ?{core::int} #t23 as{TypeError,ForNonNullableByDefault} core::int : #t23{core::int};
-
-
-Extra constant evaluation status:
-Evaluated: MethodInvocation @ org-dartlang-testcase:///initializer_rewrite_from_opt_out_lib.dart:7:30 -> BoolConstant(true)
-Evaluated: VariableGet @ org-dartlang-testcase:///initializer_rewrite_from_opt_out_lib.dart:7:30 -> NullConstant(null)
-Evaluated: VariableGet @ org-dartlang-testcase:///initializer_rewrite_from_opt_out_lib.dart:7:30 -> NullConstant(null)
-Extra constant evaluation: evaluated: 185, effectively constant: 3
+static method computeInitialValue() → core::int*
+ return null;
diff --git a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.outline.expect b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.outline.expect
index edaef86..8fc95bd 100644
--- a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.outline.expect
+++ b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.outline.expect
@@ -1,4 +1,4 @@
-library /*isNonNullableByDefault*/;
+library;
//
// Problems in library:
//
diff --git a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.expect b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.expect
index 3e34630..6ffbd4b 100644
--- a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.expect
+++ b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.expect
@@ -1,4 +1,4 @@
-library /*isNonNullableByDefault*/;
+library;
//
// Problems in library:
//
@@ -6,43 +6,6 @@
// // @dart=2.8
// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:10:19: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
-// topLevelField = null;
-// ^
-//
-// pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:14:21: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
-// c.instanceField = null;
-// ^
-//
-// pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:16:28: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
-// c.instanceTypeVariable = null;
-// ^
-//
-// pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:17:33: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
-// c.finalInstanceTypeVariable = null;
-// ^
-//
-// pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:19:23: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
-// Class.staticField = null;
-// ^
-//
-// pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:33:46: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
-// throws(() => c.finalInstanceTypeVariable = null);
-// ^
-//
-// pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:36:16: Error: The argument type 'Null' can't be assigned to the parameter type 'int'.
-// method(true, null, null);
-// ^
-//
-// pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:36:3: Error: Inferred type argument 'Null' doesn't conform to the bound 'Object' of the type variable 'T' on 'method'.
-// - 'Object' is from 'dart:core'.
-// Try specifying type arguments explicitly so that they conform to the bounds.
-// method(true, null, null);
-// ^
-// pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out_lib.dart:18:8: Context: This is the type variable whose bound isn't conformed to.
-// method<T extends Object>(bool b, int i, T t) {
-// ^
-//
import self as self;
import "non_nullable_from_opt_out_lib.dart" as non;
import "dart:core" as core;
@@ -50,24 +13,14 @@
import "org-dartlang-testcase:///non_nullable_from_opt_out_lib.dart";
static method main() → dynamic {
- non::topLevelField = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:10:19: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
- topLevelField = null;
- ^" in null as{TypeError,ForNonNullableByDefault} core::int;
+ non::topLevelField = null;
non::finalTopLevelField = null;
- non::Class<core::int> c = new non::Class::•<core::int>();
- c.{non::Class::instanceField} = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:14:21: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
- c.instanceField = null;
- ^" in null as{TypeError,ForNonNullableByDefault} core::int;
+ non::Class<core::int*>* c = new non::Class::•<core::int*>();
+ c.{non::Class::instanceField} = null;
c.{non::Class::finalInstanceField} = null;
- c.{non::Class::instanceTypeVariable} = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:16:28: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
- c.instanceTypeVariable = null;
- ^" in null as{TypeError,ForNonNullableByDefault} core::int;
- c.{non::Class::finalInstanceTypeVariable} = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:17:33: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
- c.finalInstanceTypeVariable = null;
- ^" in null as{TypeError,ForNonNullableByDefault} core::int;
- non::Class::staticField = let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:19:23: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
- Class.staticField = null;
- ^" in null as{TypeError,ForNonNullableByDefault} core::int;
+ c.{non::Class::instanceTypeVariable} = null;
+ c.{non::Class::finalInstanceTypeVariable} = null;
+ non::Class::staticField = null;
non::Class::staticFinalField = null;
non::expect(null, non::topLevelField);
non::expect(null, non::finalTopLevelField);
@@ -79,13 +32,9 @@
non::expect(null, non::Class::staticFinalField);
non::throws(() → core::Null? => non::finalTopLevelField = null);
non::throws(() → core::Null? => c.{non::Class::finalInstanceField} = null);
- non::throws(() → core::Null? => c.{non::Class::finalInstanceTypeVariable} = let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:33:46: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
- throws(() => c.finalInstanceTypeVariable = null);
- ^" in null as{TypeError,ForNonNullableByDefault} core::int);
+ non::throws(() → core::Null? => c.{non::Class::finalInstanceTypeVariable} = null);
non::throws(() → core::Null? => non::Class::staticFinalField = null);
- non::method<core::Null?>(true, let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:36:16: Error: The argument type 'Null' can't be assigned to the parameter type 'int'.
- method(true, null, null);
- ^" in null as{TypeError,ForNonNullableByDefault} core::int, null);
+ non::method<core::Null?>(true, null, null);
}
library /*isNonNullableByDefault*/;
@@ -106,87 +55,87 @@
: super core::Object::•()
;
get instanceField() → core::int
- return let final core::int? #t8 = this.{non::Class::_#Class#instanceField} in #t8.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'instanceField' has not been initialized.") : #t8{core::int};
- set instanceField(core::int #t9) → void
- this.{non::Class::_#Class#instanceField} = #t9;
+ return let final core::int? #t1 = this.{non::Class::_#Class#instanceField} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'instanceField' has not been initialized.") : #t1{core::int};
+ set instanceField(core::int #t2) → void
+ this.{non::Class::_#Class#instanceField} = #t2;
get finalInstanceField() → dynamic
return this.{non::Class::_#Class#finalInstanceField#isSet} ?{dynamic} this.{non::Class::_#Class#finalInstanceField} : throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has not been initialized.");
- set finalInstanceField(dynamic #t10) → void
+ set finalInstanceField(dynamic #t3) → void
if(this.{non::Class::_#Class#finalInstanceField#isSet})
throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has already been initialized.");
else {
this.{non::Class::_#Class#finalInstanceField#isSet} = true;
- this.{non::Class::_#Class#finalInstanceField} = #t10;
+ this.{non::Class::_#Class#finalInstanceField} = #t3;
}
get instanceTypeVariable() → non::Class::T
- return let final non::Class::T? #t11 = this.{non::Class::_#Class#instanceTypeVariable} in #t11.==(null) ?{non::Class::T} throw new _in::LateInitializationErrorImpl::•("Field 'instanceTypeVariable' has not been initialized.") : #t11{non::Class::T};
- set instanceTypeVariable(generic-covariant-impl non::Class::T #t12) → void
- this.{non::Class::_#Class#instanceTypeVariable} = #t12;
+ return let final non::Class::T? #t4 = this.{non::Class::_#Class#instanceTypeVariable} in #t4.==(null) ?{non::Class::T} throw new _in::LateInitializationErrorImpl::•("Field 'instanceTypeVariable' has not been initialized.") : #t4{non::Class::T};
+ set instanceTypeVariable(generic-covariant-impl non::Class::T #t5) → void
+ this.{non::Class::_#Class#instanceTypeVariable} = #t5;
get finalInstanceTypeVariable() → non::Class::T
- return let final non::Class::T? #t13 = this.{non::Class::_#Class#finalInstanceTypeVariable} in #t13.==(null) ?{non::Class::T} throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceTypeVariable' has not been initialized.") : #t13{non::Class::T};
- set finalInstanceTypeVariable(non::Class::T #t14) → void
+ return let final non::Class::T? #t6 = this.{non::Class::_#Class#finalInstanceTypeVariable} in #t6.==(null) ?{non::Class::T} throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceTypeVariable' has not been initialized.") : #t6{non::Class::T};
+ set finalInstanceTypeVariable(non::Class::T #t7) → void
if(this.{non::Class::_#Class#finalInstanceTypeVariable}.==(null))
- this.{non::Class::_#Class#finalInstanceTypeVariable} = #t14;
+ this.{non::Class::_#Class#finalInstanceTypeVariable} = #t7;
else
throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceTypeVariable' has already been initialized.");
static get staticField() → core::int
- return let final core::int? #t15 = non::Class::_#staticField in #t15.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'staticField' has not been initialized.") : #t15{core::int};
- static set staticField(core::int #t16) → void
- non::Class::_#staticField = #t16;
+ return let final core::int? #t8 = non::Class::_#staticField in #t8.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'staticField' has not been initialized.") : #t8{core::int};
+ static set staticField(core::int #t9) → void
+ non::Class::_#staticField = #t9;
static get staticFinalField() → dynamic
return non::Class::_#staticFinalField#isSet ?{dynamic} non::Class::_#staticFinalField : throw new _in::LateInitializationErrorImpl::•("Field 'staticFinalField' has not been initialized.");
- static set staticFinalField(dynamic #t17) → void
+ static set staticFinalField(dynamic #t10) → void
if(non::Class::_#staticFinalField#isSet)
throw new _in::LateInitializationErrorImpl::•("Field 'staticFinalField' has already been initialized.");
else {
non::Class::_#staticFinalField#isSet = true;
- non::Class::_#staticFinalField = #t17;
+ non::Class::_#staticFinalField = #t10;
}
}
static field core::int? _#topLevelField = null;
static field dynamic _#finalTopLevelField = null;
static field core::bool _#finalTopLevelField#isSet = false;
static get topLevelField() → core::int
- return let final core::int? #t18 = non::_#topLevelField in #t18.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'topLevelField' has not been initialized.") : #t18{core::int};
-static set topLevelField(core::int #t19) → void
- non::_#topLevelField = #t19;
+ return let final core::int? #t11 = non::_#topLevelField in #t11.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'topLevelField' has not been initialized.") : #t11{core::int};
+static set topLevelField(core::int #t12) → void
+ non::_#topLevelField = #t12;
static get finalTopLevelField() → dynamic
return non::_#finalTopLevelField#isSet ?{dynamic} non::_#finalTopLevelField : throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelField' has not been initialized.");
-static set finalTopLevelField(dynamic #t20) → void
+static set finalTopLevelField(dynamic #t13) → void
if(non::_#finalTopLevelField#isSet)
throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelField' has already been initialized.");
else {
non::_#finalTopLevelField#isSet = true;
- non::_#finalTopLevelField = #t20;
+ non::_#finalTopLevelField = #t13;
}
static method method<T extends core::Object = core::Object>(core::bool b, core::int i, non::method::T t) → dynamic {
core::int? local;
function #local#get() → core::int
- return let final core::int? #t21 = local in #t21.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local' has not been initialized.") : #t21{core::int};
- function #local#set(core::int #t22) → dynamic
- return local = #t22;
+ return let final core::int? #t14 = local in #t14.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local' has not been initialized.") : #t14{core::int};
+ function #local#set(core::int #t15) → dynamic
+ return local = #t15;
final dynamic finalLocal;
core::bool #finalLocal#isSet = false;
function #finalLocal#get() → dynamic
return #finalLocal#isSet ?{dynamic} finalLocal : throw new _in::LateInitializationErrorImpl::•("Local 'finalLocal' has not been initialized.");
- function #finalLocal#set(dynamic #t23) → dynamic
+ function #finalLocal#set(dynamic #t16) → dynamic
if(#finalLocal#isSet)
throw new _in::LateInitializationErrorImpl::•("Local 'finalLocal' has already been initialized.");
else {
#finalLocal#isSet = true;
- return finalLocal = #t23;
+ return finalLocal = #t16;
}
non::method::T? localTypeVariable;
function #localTypeVariable#get() → non::method::T
- return let final non::method::T? #t24 = localTypeVariable in #t24.==(null) ?{non::method::T} throw new _in::LateInitializationErrorImpl::•("Local 'localTypeVariable' has not been initialized.") : #t24{non::method::T};
- function #localTypeVariable#set(non::method::T #t25) → dynamic
- return localTypeVariable = #t25;
+ return let final non::method::T? #t17 = localTypeVariable in #t17.==(null) ?{non::method::T} throw new _in::LateInitializationErrorImpl::•("Local 'localTypeVariable' has not been initialized.") : #t17{non::method::T};
+ function #localTypeVariable#set(non::method::T #t18) → dynamic
+ return localTypeVariable = #t18;
final non::method::T? finalLocalTypeVariable;
function #finalLocalTypeVariable#get() → non::method::T
- return let final non::method::T? #t26 = finalLocalTypeVariable in #t26.==(null) ?{non::method::T} throw new _in::LateInitializationErrorImpl::•("Local 'finalLocalTypeVariable' has not been initialized.") : #t26{non::method::T};
- function #finalLocalTypeVariable#set(non::method::T #t27) → dynamic
+ return let final non::method::T? #t19 = finalLocalTypeVariable in #t19.==(null) ?{non::method::T} throw new _in::LateInitializationErrorImpl::•("Local 'finalLocalTypeVariable' has not been initialized.") : #t19{non::method::T};
+ function #finalLocalTypeVariable#set(non::method::T #t20) → dynamic
if(finalLocalTypeVariable.==(null))
- return finalLocalTypeVariable = #t27;
+ return finalLocalTypeVariable = #t20;
else
throw new _in::LateInitializationErrorImpl::•("Local 'finalLocalTypeVariable' has already been initialized.");
if(b) {
diff --git a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.transformed.expect
index 0980864..6ffbd4b 100644
--- a/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart.strong.transformed.expect
@@ -1,4 +1,4 @@
-library /*isNonNullableByDefault*/;
+library;
//
// Problems in library:
//
@@ -6,43 +6,6 @@
// // @dart=2.8
// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:10:19: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
-// topLevelField = null;
-// ^
-//
-// pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:14:21: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
-// c.instanceField = null;
-// ^
-//
-// pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:16:28: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
-// c.instanceTypeVariable = null;
-// ^
-//
-// pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:17:33: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
-// c.finalInstanceTypeVariable = null;
-// ^
-//
-// pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:19:23: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
-// Class.staticField = null;
-// ^
-//
-// pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:33:46: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
-// throws(() => c.finalInstanceTypeVariable = null);
-// ^
-//
-// pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:36:16: Error: The argument type 'Null' can't be assigned to the parameter type 'int'.
-// method(true, null, null);
-// ^
-//
-// pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:36:3: Error: Inferred type argument 'Null' doesn't conform to the bound 'Object' of the type variable 'T' on 'method'.
-// - 'Object' is from 'dart:core'.
-// Try specifying type arguments explicitly so that they conform to the bounds.
-// method(true, null, null);
-// ^
-// pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out_lib.dart:18:8: Context: This is the type variable whose bound isn't conformed to.
-// method<T extends Object>(bool b, int i, T t) {
-// ^
-//
import self as self;
import "non_nullable_from_opt_out_lib.dart" as non;
import "dart:core" as core;
@@ -50,24 +13,14 @@
import "org-dartlang-testcase:///non_nullable_from_opt_out_lib.dart";
static method main() → dynamic {
- non::topLevelField = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:10:19: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
- topLevelField = null;
- ^" in let core::Null? #t2 = null in #t2.==(null) ?{core::int} #t2 as{TypeError,ForNonNullableByDefault} core::int : #t2{core::int};
+ non::topLevelField = null;
non::finalTopLevelField = null;
- non::Class<core::int> c = new non::Class::•<core::int>();
- c.{non::Class::instanceField} = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:14:21: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
- c.instanceField = null;
- ^" in let core::Null? #t4 = null in #t4.==(null) ?{core::int} #t4 as{TypeError,ForNonNullableByDefault} core::int : #t4{core::int};
+ non::Class<core::int*>* c = new non::Class::•<core::int*>();
+ c.{non::Class::instanceField} = null;
c.{non::Class::finalInstanceField} = null;
- c.{non::Class::instanceTypeVariable} = let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:16:28: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
- c.instanceTypeVariable = null;
- ^" in let core::Null? #t6 = null in #t6.==(null) ?{core::int} #t6 as{TypeError,ForNonNullableByDefault} core::int : #t6{core::int};
- c.{non::Class::finalInstanceTypeVariable} = let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:17:33: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
- c.finalInstanceTypeVariable = null;
- ^" in let core::Null? #t8 = null in #t8.==(null) ?{core::int} #t8 as{TypeError,ForNonNullableByDefault} core::int : #t8{core::int};
- non::Class::staticField = let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:19:23: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
- Class.staticField = null;
- ^" in let core::Null? #t10 = null in #t10.==(null) ?{core::int} #t10 as{TypeError,ForNonNullableByDefault} core::int : #t10{core::int};
+ c.{non::Class::instanceTypeVariable} = null;
+ c.{non::Class::finalInstanceTypeVariable} = null;
+ non::Class::staticField = null;
non::Class::staticFinalField = null;
non::expect(null, non::topLevelField);
non::expect(null, non::finalTopLevelField);
@@ -79,13 +32,9 @@
non::expect(null, non::Class::staticFinalField);
non::throws(() → core::Null? => non::finalTopLevelField = null);
non::throws(() → core::Null? => c.{non::Class::finalInstanceField} = null);
- non::throws(() → core::Null? => c.{non::Class::finalInstanceTypeVariable} = let final<BottomType> #t11 = invalid-expression "pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:33:46: Error: A value of type 'Null' can't be assigned to a variable of type 'int'.
- throws(() => c.finalInstanceTypeVariable = null);
- ^" in let core::Null? #t12 = null in #t12.==(null) ?{core::int} #t12 as{TypeError,ForNonNullableByDefault} core::int : #t12{core::int});
+ non::throws(() → core::Null? => c.{non::Class::finalInstanceTypeVariable} = null);
non::throws(() → core::Null? => non::Class::staticFinalField = null);
- non::method<core::Null?>(true, let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/late_lowering/non_nullable_from_opt_out.dart:36:16: Error: The argument type 'Null' can't be assigned to the parameter type 'int'.
- method(true, null, null);
- ^" in let core::Null? #t14 = null in #t14.==(null) ?{core::int} #t14 as{TypeError,ForNonNullableByDefault} core::int : #t14{core::int}, null);
+ non::method<core::Null?>(true, null, null);
}
library /*isNonNullableByDefault*/;
@@ -106,87 +55,87 @@
: super core::Object::•()
;
get instanceField() → core::int
- return let final core::int? #t15 = this.{non::Class::_#Class#instanceField} in #t15.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'instanceField' has not been initialized.") : #t15{core::int};
- set instanceField(core::int #t16) → void
- this.{non::Class::_#Class#instanceField} = #t16;
+ return let final core::int? #t1 = this.{non::Class::_#Class#instanceField} in #t1.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'instanceField' has not been initialized.") : #t1{core::int};
+ set instanceField(core::int #t2) → void
+ this.{non::Class::_#Class#instanceField} = #t2;
get finalInstanceField() → dynamic
return this.{non::Class::_#Class#finalInstanceField#isSet} ?{dynamic} this.{non::Class::_#Class#finalInstanceField} : throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has not been initialized.");
- set finalInstanceField(dynamic #t17) → void
+ set finalInstanceField(dynamic #t3) → void
if(this.{non::Class::_#Class#finalInstanceField#isSet})
throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceField' has already been initialized.");
else {
this.{non::Class::_#Class#finalInstanceField#isSet} = true;
- this.{non::Class::_#Class#finalInstanceField} = #t17;
+ this.{non::Class::_#Class#finalInstanceField} = #t3;
}
get instanceTypeVariable() → non::Class::T
- return let final non::Class::T? #t18 = this.{non::Class::_#Class#instanceTypeVariable} in #t18.==(null) ?{non::Class::T} throw new _in::LateInitializationErrorImpl::•("Field 'instanceTypeVariable' has not been initialized.") : #t18{non::Class::T};
- set instanceTypeVariable(generic-covariant-impl non::Class::T #t19) → void
- this.{non::Class::_#Class#instanceTypeVariable} = #t19;
+ return let final non::Class::T? #t4 = this.{non::Class::_#Class#instanceTypeVariable} in #t4.==(null) ?{non::Class::T} throw new _in::LateInitializationErrorImpl::•("Field 'instanceTypeVariable' has not been initialized.") : #t4{non::Class::T};
+ set instanceTypeVariable(generic-covariant-impl non::Class::T #t5) → void
+ this.{non::Class::_#Class#instanceTypeVariable} = #t5;
get finalInstanceTypeVariable() → non::Class::T
- return let final non::Class::T? #t20 = this.{non::Class::_#Class#finalInstanceTypeVariable} in #t20.==(null) ?{non::Class::T} throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceTypeVariable' has not been initialized.") : #t20{non::Class::T};
- set finalInstanceTypeVariable(non::Class::T #t21) → void
+ return let final non::Class::T? #t6 = this.{non::Class::_#Class#finalInstanceTypeVariable} in #t6.==(null) ?{non::Class::T} throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceTypeVariable' has not been initialized.") : #t6{non::Class::T};
+ set finalInstanceTypeVariable(non::Class::T #t7) → void
if(this.{non::Class::_#Class#finalInstanceTypeVariable}.==(null))
- this.{non::Class::_#Class#finalInstanceTypeVariable} = #t21;
+ this.{non::Class::_#Class#finalInstanceTypeVariable} = #t7;
else
throw new _in::LateInitializationErrorImpl::•("Field 'finalInstanceTypeVariable' has already been initialized.");
static get staticField() → core::int
- return let final core::int? #t22 = non::Class::_#staticField in #t22.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'staticField' has not been initialized.") : #t22{core::int};
- static set staticField(core::int #t23) → void
- non::Class::_#staticField = #t23;
+ return let final core::int? #t8 = non::Class::_#staticField in #t8.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'staticField' has not been initialized.") : #t8{core::int};
+ static set staticField(core::int #t9) → void
+ non::Class::_#staticField = #t9;
static get staticFinalField() → dynamic
return non::Class::_#staticFinalField#isSet ?{dynamic} non::Class::_#staticFinalField : throw new _in::LateInitializationErrorImpl::•("Field 'staticFinalField' has not been initialized.");
- static set staticFinalField(dynamic #t24) → void
+ static set staticFinalField(dynamic #t10) → void
if(non::Class::_#staticFinalField#isSet)
throw new _in::LateInitializationErrorImpl::•("Field 'staticFinalField' has already been initialized.");
else {
non::Class::_#staticFinalField#isSet = true;
- non::Class::_#staticFinalField = #t24;
+ non::Class::_#staticFinalField = #t10;
}
}
static field core::int? _#topLevelField = null;
static field dynamic _#finalTopLevelField = null;
static field core::bool _#finalTopLevelField#isSet = false;
static get topLevelField() → core::int
- return let final core::int? #t25 = non::_#topLevelField in #t25.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'topLevelField' has not been initialized.") : #t25{core::int};
-static set topLevelField(core::int #t26) → void
- non::_#topLevelField = #t26;
+ return let final core::int? #t11 = non::_#topLevelField in #t11.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Field 'topLevelField' has not been initialized.") : #t11{core::int};
+static set topLevelField(core::int #t12) → void
+ non::_#topLevelField = #t12;
static get finalTopLevelField() → dynamic
return non::_#finalTopLevelField#isSet ?{dynamic} non::_#finalTopLevelField : throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelField' has not been initialized.");
-static set finalTopLevelField(dynamic #t27) → void
+static set finalTopLevelField(dynamic #t13) → void
if(non::_#finalTopLevelField#isSet)
throw new _in::LateInitializationErrorImpl::•("Field 'finalTopLevelField' has already been initialized.");
else {
non::_#finalTopLevelField#isSet = true;
- non::_#finalTopLevelField = #t27;
+ non::_#finalTopLevelField = #t13;
}
static method method<T extends core::Object = core::Object>(core::bool b, core::int i, non::method::T t) → dynamic {
core::int? local;
function #local#get() → core::int
- return let final core::int? #t28 = local in #t28.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local' has not been initialized.") : #t28{core::int};
- function #local#set(core::int #t29) → dynamic
- return local = #t29;
+ return let final core::int? #t14 = local in #t14.==(null) ?{core::int} throw new _in::LateInitializationErrorImpl::•("Local 'local' has not been initialized.") : #t14{core::int};
+ function #local#set(core::int #t15) → dynamic
+ return local = #t15;
final dynamic finalLocal;
core::bool #finalLocal#isSet = false;
function #finalLocal#get() → dynamic
return #finalLocal#isSet ?{dynamic} finalLocal : throw new _in::LateInitializationErrorImpl::•("Local 'finalLocal' has not been initialized.");
- function #finalLocal#set(dynamic #t30) → dynamic
+ function #finalLocal#set(dynamic #t16) → dynamic
if(#finalLocal#isSet)
throw new _in::LateInitializationErrorImpl::•("Local 'finalLocal' has already been initialized.");
else {
#finalLocal#isSet = true;
- return finalLocal = #t30;
+ return finalLocal = #t16;
}
non::method::T? localTypeVariable;
function #localTypeVariable#get() → non::method::T
- return let final non::method::T? #t31 = localTypeVariable in #t31.==(null) ?{non::method::T} throw new _in::LateInitializationErrorImpl::•("Local 'localTypeVariable' has not been initialized.") : #t31{non::method::T};
- function #localTypeVariable#set(non::method::T #t32) → dynamic
- return localTypeVariable = #t32;
+ return let final non::method::T? #t17 = localTypeVariable in #t17.==(null) ?{non::method::T} throw new _in::LateInitializationErrorImpl::•("Local 'localTypeVariable' has not been initialized.") : #t17{non::method::T};
+ function #localTypeVariable#set(non::method::T #t18) → dynamic
+ return localTypeVariable = #t18;
final non::method::T? finalLocalTypeVariable;
function #finalLocalTypeVariable#get() → non::method::T
- return let final non::method::T? #t33 = finalLocalTypeVariable in #t33.==(null) ?{non::method::T} throw new _in::LateInitializationErrorImpl::•("Local 'finalLocalTypeVariable' has not been initialized.") : #t33{non::method::T};
- function #finalLocalTypeVariable#set(non::method::T #t34) → dynamic
+ return let final non::method::T? #t19 = finalLocalTypeVariable in #t19.==(null) ?{non::method::T} throw new _in::LateInitializationErrorImpl::•("Local 'finalLocalTypeVariable' has not been initialized.") : #t19{non::method::T};
+ function #finalLocalTypeVariable#set(non::method::T #t20) → dynamic
if(finalLocalTypeVariable.==(null))
- return finalLocalTypeVariable = #t34;
+ return finalLocalTypeVariable = #t20;
else
throw new _in::LateInitializationErrorImpl::•("Local 'finalLocalTypeVariable' has already been initialized.");
if(b) {
@@ -215,28 +164,3 @@
}
throw "Missing exception";
}
-
-
-Extra constant evaluation status:
-Evaluated: MethodInvocation @ org-dartlang-testcase:///non_nullable_from_opt_out.dart:10:19 -> BoolConstant(true)
-Evaluated: VariableGet @ org-dartlang-testcase:///non_nullable_from_opt_out.dart:10:19 -> NullConstant(null)
-Evaluated: VariableGet @ org-dartlang-testcase:///non_nullable_from_opt_out.dart:10:19 -> NullConstant(null)
-Evaluated: MethodInvocation @ org-dartlang-testcase:///non_nullable_from_opt_out.dart:14:21 -> BoolConstant(true)
-Evaluated: VariableGet @ org-dartlang-testcase:///non_nullable_from_opt_out.dart:14:21 -> NullConstant(null)
-Evaluated: VariableGet @ org-dartlang-testcase:///non_nullable_from_opt_out.dart:14:21 -> NullConstant(null)
-Evaluated: MethodInvocation @ org-dartlang-testcase:///non_nullable_from_opt_out.dart:16:28 -> BoolConstant(true)
-Evaluated: VariableGet @ org-dartlang-testcase:///non_nullable_from_opt_out.dart:16:28 -> NullConstant(null)
-Evaluated: VariableGet @ org-dartlang-testcase:///non_nullable_from_opt_out.dart:16:28 -> NullConstant(null)
-Evaluated: MethodInvocation @ org-dartlang-testcase:///non_nullable_from_opt_out.dart:17:33 -> BoolConstant(true)
-Evaluated: VariableGet @ org-dartlang-testcase:///non_nullable_from_opt_out.dart:17:33 -> NullConstant(null)
-Evaluated: VariableGet @ org-dartlang-testcase:///non_nullable_from_opt_out.dart:17:33 -> NullConstant(null)
-Evaluated: MethodInvocation @ org-dartlang-testcase:///non_nullable_from_opt_out.dart:19:23 -> BoolConstant(true)
-Evaluated: VariableGet @ org-dartlang-testcase:///non_nullable_from_opt_out.dart:19:23 -> NullConstant(null)
-Evaluated: VariableGet @ org-dartlang-testcase:///non_nullable_from_opt_out.dart:19:23 -> NullConstant(null)
-Evaluated: MethodInvocation @ org-dartlang-testcase:///non_nullable_from_opt_out.dart:33:46 -> BoolConstant(true)
-Evaluated: VariableGet @ org-dartlang-testcase:///non_nullable_from_opt_out.dart:33:46 -> NullConstant(null)
-Evaluated: VariableGet @ org-dartlang-testcase:///non_nullable_from_opt_out.dart:33:46 -> NullConstant(null)
-Evaluated: MethodInvocation @ org-dartlang-testcase:///non_nullable_from_opt_out.dart:36:16 -> BoolConstant(true)
-Evaluated: VariableGet @ org-dartlang-testcase:///non_nullable_from_opt_out.dart:36:16 -> NullConstant(null)
-Evaluated: VariableGet @ org-dartlang-testcase:///non_nullable_from_opt_out.dart:36:16 -> NullConstant(null)
-Extra constant evaluation: evaluated: 291, effectively constant: 21
diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.outline.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.outline.expect
index acb4c8d..953b07d 100644
--- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.outline.expect
+++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.outline.expect
@@ -13,6 +13,8 @@
library;
import self as self2;
+import "dart:core" as core;
+static field core::int* x;
static method foo() → void
;
diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.expect
index b5f4dc2..6501ffc 100644
--- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.expect
@@ -17,6 +17,7 @@
import self as str;
import "dart:core" as core;
+static field core::int* x;
static method foo() → void {
core::print("hello");
}
diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.transformed.expect
index b5f4dc2..6501ffc 100644
--- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.transformed.expect
@@ -17,6 +17,7 @@
import self as str;
import "dart:core" as core;
+static field core::int* x;
static method foo() → void {
core::print("hello");
}
diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.weak.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.weak.expect
index dfa3681..c9d352f 100644
--- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.weak.expect
@@ -12,6 +12,7 @@
import self as str;
import "dart:core" as core;
+static field core::int* x;
static method foo() → void {
core::print("hello");
}
diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.weak.transformed.expect
index dfa3681..c9d352f 100644
--- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.weak.transformed.expect
@@ -12,6 +12,7 @@
import self as str;
import "dart:core" as core;
+static field core::int* x;
static method foo() → void {
core::print("hello");
}
diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart
index 930d387..ed07dd6 100644
--- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart
+++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart
@@ -1,5 +1,7 @@
// @dart = 2.7
+int x;
+
void foo() {
print("hello");
}
diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.outline.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.outline.expect
index 7a170f8..f0ae2dc 100644
--- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.outline.expect
+++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.outline.expect
@@ -6,7 +6,7 @@
static method main() → dynamic
;
-library /*isNonNullableByDefault*/;
+library;
//
// Problems in library:
//
@@ -15,6 +15,8 @@
// ^^^^^^^^^^^^^^
//
import self as self2;
+import "dart:core" as core;
+static field core::int* x;
static method foo() → void
;
diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.expect
index 701927d..fecb1f5 100644
--- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.expect
@@ -8,7 +8,7 @@
str::foo();
}
-library /*isNonNullableByDefault*/;
+library;
//
// Problems in library:
//
@@ -19,6 +19,7 @@
import self as str;
import "dart:core" as core;
+static field core::int* x;
static method foo() → void {
core::print("hello");
}
diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.transformed.expect
index 701927d..fecb1f5 100644
--- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.transformed.expect
@@ -8,7 +8,7 @@
str::foo();
}
-library /*isNonNullableByDefault*/;
+library;
//
// Problems in library:
//
@@ -19,6 +19,7 @@
import self as str;
import "dart:core" as core;
+static field core::int* x;
static method foo() → void {
core::print("hello");
}
diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.weak.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.weak.expect
index dfa3681..c9d352f 100644
--- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.weak.expect
@@ -12,6 +12,7 @@
import self as str;
import "dart:core" as core;
+static field core::int* x;
static method foo() → void {
core::print("hello");
}
diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.weak.transformed.expect
index dfa3681..c9d352f 100644
--- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.weak.transformed.expect
@@ -12,6 +12,7 @@
import self as str;
import "dart:core" as core;
+static field core::int* x;
static method foo() → void {
core::print("hello");
}
diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong_lib.dart b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong_lib.dart
index 930d387..ed07dd6 100644
--- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong_lib.dart
+++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong_lib.dart
@@ -1,5 +1,7 @@
// @dart = 2.7
+int x;
+
void foo() {
print("hello");
}
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/opt_out_package/lib/regular_lib1.dart b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/opt_out_package/lib/regular_lib1.dart
index a08c72e..a3a3556 100644
--- a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/opt_out_package/lib/regular_lib1.dart
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/opt_out_package/lib/regular_lib1.dart
@@ -1,3 +1,5 @@
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// 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.
+
+int x;
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/opt_out_package/lib/regular_lib2.dart b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/opt_out_package/lib/regular_lib2.dart
index a08c72e..0ba8a05 100644
--- a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/opt_out_package/lib/regular_lib2.dart
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_dill/opt_out_package/lib/regular_lib2.dart
@@ -1,3 +1,5 @@
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// 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.
+
+int y;
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib1.dart b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib1.dart
index a08c72e..a3a3556 100644
--- a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib1.dart
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib1.dart
@@ -1,3 +1,5 @@
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// 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.
+
+int x;
diff --git a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib2.dart b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib2.dart
index a08c72e..0ba8a05 100644
--- a/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib2.dart
+++ b/pkg/front_end/testcases/nnbd/strong_package_not_ok_from_source/opt_out_package/lib/regular_lib2.dart
@@ -1,3 +1,5 @@
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// 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.
+
+int y;
diff --git a/pkg/front_end/testcases/value_class/value_implements_non_value.dart b/pkg/front_end/testcases/value_class/value_implements_non_value.dart
index ccb27e8..6b6cf57 100644
--- a/pkg/front_end/testcases/value_class/value_implements_non_value.dart
+++ b/pkg/front_end/testcases/value_class/value_implements_non_value.dart
@@ -2,7 +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.
-import '../nnbd_mixed/nnbd_opt_out_language_version.dart';
import 'value_class_support_lib.dart';
class Animal {
diff --git a/pkg/front_end/testcases/value_class/value_implements_non_value.dart.outline.expect b/pkg/front_end/testcases/value_class/value_implements_non_value.dart.outline.expect
index 73b6a82..4896c3e 100644
--- a/pkg/front_end/testcases/value_class/value_implements_non_value.dart.outline.expect
+++ b/pkg/front_end/testcases/value_class/value_implements_non_value.dart.outline.expect
@@ -3,7 +3,6 @@
import "dart:core" as core;
import "value_class_support_lib.dart" as val;
-import "org-dartlang-testcase-sdk:///pkg/front_end/testcases/nnbd_mixed/nnbd_opt_out_language_version.dart";
import "org-dartlang-testcase:///value_class_support_lib.dart";
class Animal extends core::Object {
@@ -36,38 +35,6 @@
;
library /*isNonNullableByDefault*/;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/nnbd_mixed/nnbd_opt_out_language_version.dart:1:1: Error: A library can't opt out of null safety by default, when using sound null safety.
-// // @dart=2.4
-// ^^^^^^^^^^^^
-//
-import self as self2;
-import "dart:core" as core;
-
-class late extends core::Object {
- synthetic constructor •() → self2::late
- ;
- get g() → core::int
- ;
-}
-class required extends core::Object {
- synthetic constructor •() → self2::required
- ;
- get g() → core::int
- ;
-}
-class C extends core::Object {
- field self2::late l;
- field self2::required r;
- synthetic constructor •() → self2::C
- ;
-}
-static method main() → dynamic
- ;
-
-library /*isNonNullableByDefault*/;
import self as val;
import "dart:core" as core;
@@ -83,6 +50,6 @@
Extra constant evaluation status:
-Evaluated: StaticGet @ org-dartlang-testcase:///value_implements_non_value.dart:12:2 -> StringConstant("valueClass")
-Evaluated: StaticGet @ org-dartlang-testcase:///value_implements_non_value.dart:22:2 -> StringConstant("valueClass")
+Evaluated: StaticGet @ org-dartlang-testcase:///value_implements_non_value.dart:11:2 -> StringConstant("valueClass")
+Evaluated: StaticGet @ org-dartlang-testcase:///value_implements_non_value.dart:21:2 -> StringConstant("valueClass")
Extra constant evaluation: evaluated: 2, effectively constant: 2
diff --git a/pkg/front_end/testcases/value_class/value_implements_non_value.dart.strong.expect b/pkg/front_end/testcases/value_class/value_implements_non_value.dart.strong.expect
index 0c996cf..ea9e6be 100644
--- a/pkg/front_end/testcases/value_class/value_implements_non_value.dart.strong.expect
+++ b/pkg/front_end/testcases/value_class/value_implements_non_value.dart.strong.expect
@@ -2,69 +2,69 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:30:22: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:29:22: Error: No named parameter with the name 'numberOfLegs'.
// Cat firstCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:12:7: Context: The class 'Cat' has a constructor that takes no arguments.
// class Cat implements Animal {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:31:23: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:30:23: Error: No named parameter with the name 'numberOfLegs'.
// Cat secondCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:12:7: Context: The class 'Cat' has a constructor that takes no arguments.
// class Cat implements Animal {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:32:22: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:31:22: Error: No named parameter with the name 'numberOfLegs'.
// Cat thirdCat = Cat(numberOfLegs: 4, numberOfWhiskers: 0);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:12:7: Context: The class 'Cat' has a constructor that takes no arguments.
// class Cat implements Animal {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:40:25: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:39:25: Error: No named parameter with the name 'numberOfLegs'.
// Cat2 firstCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 10);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:23:7: Context: The class 'Cat2' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:22:7: Context: The class 'Cat2' has a constructor that takes no arguments.
// class Cat2 implements Animal2 {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:41:26: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:40:26: Error: No named parameter with the name 'numberOfLegs'.
// Cat2 secondCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 10);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:23:7: Context: The class 'Cat2' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:22:7: Context: The class 'Cat2' has a constructor that takes no arguments.
// class Cat2 implements Animal2 {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:42:25: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:41:25: Error: No named parameter with the name 'numberOfLegs'.
// Cat2 thirdCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 0);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:23:7: Context: The class 'Cat2' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:22:7: Context: The class 'Cat2' has a constructor that takes no arguments.
// class Cat2 implements Animal2 {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:9:13: Error: Final field 'numberOfLegs' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:8:13: Error: Final field 'numberOfLegs' is not initialized.
// Try to initialize the field in the declaration or in every constructor.
// final int numberOfLegs;
// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:14:13: Error: Final field 'numberOfLegs' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:13:13: Error: Final field 'numberOfLegs' is not initialized.
// Try to initialize the field in the declaration or in every constructor.
// final int numberOfLegs;
// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:15:13: Error: Final field 'numberOfWhiskers' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:14:13: Error: Final field 'numberOfWhiskers' is not initialized.
// Try to initialize the field in the declaration or in every constructor.
// final int numberOfWhiskers;
// ^^^^^^^^^^^^^^^^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:24:13: Error: Final field 'numberOfLegs' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:23:13: Error: Final field 'numberOfLegs' is not initialized.
// Try to initialize the field in the declaration or in every constructor.
// final int numberOfLegs;
// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:25:13: Error: Final field 'numberOfWhiskers' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:24:13: Error: Final field 'numberOfWhiskers' is not initialized.
// Try to initialize the field in the declaration or in every constructor.
// final int numberOfWhiskers;
// ^^^^^^^^^^^^^^^^
@@ -73,7 +73,6 @@
import "dart:core" as core;
import "value_class_support_lib.dart" as val;
-import "org-dartlang-testcase-sdk:///pkg/front_end/testcases/nnbd_mixed/nnbd_opt_out_language_version.dart";
import "org-dartlang-testcase:///value_class_support_lib.dart";
class Animal extends core::Object {
@@ -119,26 +118,26 @@
return new self::Cat2::•(numberOfLegs: numberOfLegs, numberOfWhiskers: numberOfWhiskers);
}
static method main() → dynamic {
- self::Cat firstCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:30:22: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat firstCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:29:22: Error: No named parameter with the name 'numberOfLegs'.
Cat firstCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
^^^^^^^^^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} self::Cat;
- self::Cat secondCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:31:23: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat secondCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:30:23: Error: No named parameter with the name 'numberOfLegs'.
Cat secondCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
^^^^^^^^^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} self::Cat;
- self::Cat thirdCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:32:22: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat thirdCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:31:22: Error: No named parameter with the name 'numberOfLegs'.
Cat thirdCat = Cat(numberOfLegs: 4, numberOfWhiskers: 0);
^^^^^^^^^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} self::Cat;
self::expect(true, firstCat.{core::Object::==}(secondCat));
self::expect(false, firstCat.{core::Object::==}(thirdCat));
self::expect(true, firstCat.{core::Object::hashCode}.{core::num::==}(secondCat.{core::Object::hashCode}));
self::expect(false, firstCat.{core::Object::hashCode}.{core::num::==}(thirdCat.{core::Object::hashCode}));
- self::Cat2 firstCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:40:25: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat2 firstCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:39:25: Error: No named parameter with the name 'numberOfLegs'.
Cat2 firstCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 10);
^^^^^^^^^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} self::Cat2;
- self::Cat2 secondCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:41:26: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat2 secondCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:40:26: Error: No named parameter with the name 'numberOfLegs'.
Cat2 secondCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 10);
^^^^^^^^^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} self::Cat2;
- self::Cat2 thirdCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:42:25: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat2 thirdCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:41:25: Error: No named parameter with the name 'numberOfLegs'.
Cat2 thirdCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 0);
^^^^^^^^^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} self::Cat2;
self::expect(true, firstCat2.{core::Object::==}(secondCat2));
@@ -152,68 +151,6 @@
}
library /*isNonNullableByDefault*/;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/nnbd_mixed/nnbd_opt_out_language_version.dart:1:1: Error: A library can't opt out of null safety by default, when using sound null safety.
-// // @dart=2.4
-// ^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd_mixed/nnbd_opt_out_language_version.dart:3:7: Error: Can't use 'late' as a name here.
-// class late {
-// ^^^^
-//
-// pkg/front_end/testcases/nnbd_mixed/nnbd_opt_out_language_version.dart:7:7: Error: Can't use 'required' as a name here.
-// class required {
-// ^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd_mixed/nnbd_opt_out_language_version.dart:12:8: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
-// Try adding the name of the type of the variable or the keyword 'var'.
-// late l = late();
-// ^
-//
-// pkg/front_end/testcases/nnbd_mixed/nnbd_opt_out_language_version.dart:13:3: Error: Can't have modifier 'required' here.
-// Try removing 'required'.
-// required r = required();
-// ^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd_mixed/nnbd_opt_out_language_version.dart:13:12: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
-// Try adding the name of the type of the variable or the keyword 'var'.
-// required r = required();
-// ^
-//
-import self as self2;
-import "dart:core" as core;
-
-class late extends core::Object {
- synthetic constructor •() → self2::late
- : super core::Object::•()
- ;
- get g() → core::int
- return 1;
-}
-class required extends core::Object {
- synthetic constructor •() → self2::required
- : super core::Object::•()
- ;
- get g() → core::int
- return 2;
-}
-class C extends core::Object {
- field self2::late l = new self2::late::•();
- field self2::required r = new self2::required::•();
- synthetic constructor •() → self2::C
- : super core::Object::•()
- ;
-}
-static method main() → dynamic {
- if(!new self2::C::•().{self2::C::l}.{self2::late::g}.{core::num::==}(1))
- throw "Expected 1";
- if(!new self2::C::•().{self2::C::r}.{self2::required::g}.{core::num::==}(2))
- throw "Expected 2";
-}
-
-library /*isNonNullableByDefault*/;
import self as val;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/value_class/value_implements_non_value.dart.strong.transformed.expect b/pkg/front_end/testcases/value_class/value_implements_non_value.dart.strong.transformed.expect
index 8073f01..dfd6ccf 100644
--- a/pkg/front_end/testcases/value_class/value_implements_non_value.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/value_class/value_implements_non_value.dart.strong.transformed.expect
@@ -2,69 +2,69 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:30:22: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:29:22: Error: No named parameter with the name 'numberOfLegs'.
// Cat firstCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:12:7: Context: The class 'Cat' has a constructor that takes no arguments.
// class Cat implements Animal {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:31:23: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:30:23: Error: No named parameter with the name 'numberOfLegs'.
// Cat secondCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:12:7: Context: The class 'Cat' has a constructor that takes no arguments.
// class Cat implements Animal {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:32:22: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:31:22: Error: No named parameter with the name 'numberOfLegs'.
// Cat thirdCat = Cat(numberOfLegs: 4, numberOfWhiskers: 0);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:12:7: Context: The class 'Cat' has a constructor that takes no arguments.
// class Cat implements Animal {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:40:25: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:39:25: Error: No named parameter with the name 'numberOfLegs'.
// Cat2 firstCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 10);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:23:7: Context: The class 'Cat2' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:22:7: Context: The class 'Cat2' has a constructor that takes no arguments.
// class Cat2 implements Animal2 {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:41:26: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:40:26: Error: No named parameter with the name 'numberOfLegs'.
// Cat2 secondCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 10);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:23:7: Context: The class 'Cat2' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:22:7: Context: The class 'Cat2' has a constructor that takes no arguments.
// class Cat2 implements Animal2 {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:42:25: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:41:25: Error: No named parameter with the name 'numberOfLegs'.
// Cat2 thirdCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 0);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:23:7: Context: The class 'Cat2' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:22:7: Context: The class 'Cat2' has a constructor that takes no arguments.
// class Cat2 implements Animal2 {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:9:13: Error: Final field 'numberOfLegs' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:8:13: Error: Final field 'numberOfLegs' is not initialized.
// Try to initialize the field in the declaration or in every constructor.
// final int numberOfLegs;
// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:14:13: Error: Final field 'numberOfLegs' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:13:13: Error: Final field 'numberOfLegs' is not initialized.
// Try to initialize the field in the declaration or in every constructor.
// final int numberOfLegs;
// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:15:13: Error: Final field 'numberOfWhiskers' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:14:13: Error: Final field 'numberOfWhiskers' is not initialized.
// Try to initialize the field in the declaration or in every constructor.
// final int numberOfWhiskers;
// ^^^^^^^^^^^^^^^^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:24:13: Error: Final field 'numberOfLegs' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:23:13: Error: Final field 'numberOfLegs' is not initialized.
// Try to initialize the field in the declaration or in every constructor.
// final int numberOfLegs;
// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:25:13: Error: Final field 'numberOfWhiskers' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:24:13: Error: Final field 'numberOfWhiskers' is not initialized.
// Try to initialize the field in the declaration or in every constructor.
// final int numberOfWhiskers;
// ^^^^^^^^^^^^^^^^
@@ -73,7 +73,6 @@
import "dart:core" as core;
import "value_class_support_lib.dart" as val;
-import "org-dartlang-testcase-sdk:///pkg/front_end/testcases/nnbd_mixed/nnbd_opt_out_language_version.dart";
import "org-dartlang-testcase:///value_class_support_lib.dart";
class Animal extends core::Object {
@@ -119,26 +118,26 @@
return new self::Cat2::•(numberOfLegs: numberOfLegs, numberOfWhiskers: numberOfWhiskers);
}
static method main() → dynamic {
- self::Cat firstCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:30:22: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat firstCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:29:22: Error: No named parameter with the name 'numberOfLegs'.
Cat firstCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
^^^^^^^^^^^^";
- self::Cat secondCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:31:23: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat secondCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:30:23: Error: No named parameter with the name 'numberOfLegs'.
Cat secondCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
^^^^^^^^^^^^";
- self::Cat thirdCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:32:22: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat thirdCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:31:22: Error: No named parameter with the name 'numberOfLegs'.
Cat thirdCat = Cat(numberOfLegs: 4, numberOfWhiskers: 0);
^^^^^^^^^^^^";
self::expect(true, firstCat.{core::Object::==}(secondCat));
self::expect(false, firstCat.{core::Object::==}(thirdCat));
self::expect(true, firstCat.{core::Object::hashCode}.{core::num::==}(secondCat.{core::Object::hashCode}));
self::expect(false, firstCat.{core::Object::hashCode}.{core::num::==}(thirdCat.{core::Object::hashCode}));
- self::Cat2 firstCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:40:25: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat2 firstCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:39:25: Error: No named parameter with the name 'numberOfLegs'.
Cat2 firstCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 10);
^^^^^^^^^^^^";
- self::Cat2 secondCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:41:26: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat2 secondCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:40:26: Error: No named parameter with the name 'numberOfLegs'.
Cat2 secondCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 10);
^^^^^^^^^^^^";
- self::Cat2 thirdCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:42:25: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat2 thirdCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:41:25: Error: No named parameter with the name 'numberOfLegs'.
Cat2 thirdCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 0);
^^^^^^^^^^^^";
self::expect(true, firstCat2.{core::Object::==}(secondCat2));
@@ -152,68 +151,6 @@
}
library /*isNonNullableByDefault*/;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/nnbd_mixed/nnbd_opt_out_language_version.dart:1:1: Error: A library can't opt out of null safety by default, when using sound null safety.
-// // @dart=2.4
-// ^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd_mixed/nnbd_opt_out_language_version.dart:3:7: Error: Can't use 'late' as a name here.
-// class late {
-// ^^^^
-//
-// pkg/front_end/testcases/nnbd_mixed/nnbd_opt_out_language_version.dart:7:7: Error: Can't use 'required' as a name here.
-// class required {
-// ^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd_mixed/nnbd_opt_out_language_version.dart:12:8: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
-// Try adding the name of the type of the variable or the keyword 'var'.
-// late l = late();
-// ^
-//
-// pkg/front_end/testcases/nnbd_mixed/nnbd_opt_out_language_version.dart:13:3: Error: Can't have modifier 'required' here.
-// Try removing 'required'.
-// required r = required();
-// ^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd_mixed/nnbd_opt_out_language_version.dart:13:12: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
-// Try adding the name of the type of the variable or the keyword 'var'.
-// required r = required();
-// ^
-//
-import self as self2;
-import "dart:core" as core;
-
-class late extends core::Object {
- synthetic constructor •() → self2::late
- : super core::Object::•()
- ;
- get g() → core::int
- return 1;
-}
-class required extends core::Object {
- synthetic constructor •() → self2::required
- : super core::Object::•()
- ;
- get g() → core::int
- return 2;
-}
-class C extends core::Object {
- field self2::late l = new self2::late::•();
- field self2::required r = new self2::required::•();
- synthetic constructor •() → self2::C
- : super core::Object::•()
- ;
-}
-static method main() → dynamic {
- if(!new self2::C::•().{self2::C::l}.{self2::late::g}.{core::num::==}(1))
- throw "Expected 1";
- if(!new self2::C::•().{self2::C::r}.{self2::required::g}.{core::num::==}(2))
- throw "Expected 2";
-}
-
-library /*isNonNullableByDefault*/;
import self as val;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/value_class/value_implements_non_value.dart.textual_outline.expect b/pkg/front_end/testcases/value_class/value_implements_non_value.dart.textual_outline.expect
index 2d8e9d2..bf86aab 100644
--- a/pkg/front_end/testcases/value_class/value_implements_non_value.dart.textual_outline.expect
+++ b/pkg/front_end/testcases/value_class/value_implements_non_value.dart.textual_outline.expect
@@ -1,4 +1,3 @@
-import '../nnbd_mixed/nnbd_opt_out_language_version.dart';
import 'value_class_support_lib.dart';
class Animal {
diff --git a/pkg/front_end/testcases/value_class/value_implements_non_value.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/value_class/value_implements_non_value.dart.textual_outline_modelled.expect
index 43b3505..0b34b85 100644
--- a/pkg/front_end/testcases/value_class/value_implements_non_value.dart.textual_outline_modelled.expect
+++ b/pkg/front_end/testcases/value_class/value_implements_non_value.dart.textual_outline_modelled.expect
@@ -1,4 +1,3 @@
-import '../nnbd_mixed/nnbd_opt_out_language_version.dart';
import 'value_class_support_lib.dart';
abstract class Animal2 {
diff --git a/pkg/front_end/testcases/value_class/value_implements_non_value.dart.weak.expect b/pkg/front_end/testcases/value_class/value_implements_non_value.dart.weak.expect
index 25f2810..ea9e6be 100644
--- a/pkg/front_end/testcases/value_class/value_implements_non_value.dart.weak.expect
+++ b/pkg/front_end/testcases/value_class/value_implements_non_value.dart.weak.expect
@@ -2,69 +2,69 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:30:22: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:29:22: Error: No named parameter with the name 'numberOfLegs'.
// Cat firstCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:12:7: Context: The class 'Cat' has a constructor that takes no arguments.
// class Cat implements Animal {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:31:23: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:30:23: Error: No named parameter with the name 'numberOfLegs'.
// Cat secondCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:12:7: Context: The class 'Cat' has a constructor that takes no arguments.
// class Cat implements Animal {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:32:22: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:31:22: Error: No named parameter with the name 'numberOfLegs'.
// Cat thirdCat = Cat(numberOfLegs: 4, numberOfWhiskers: 0);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:12:7: Context: The class 'Cat' has a constructor that takes no arguments.
// class Cat implements Animal {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:40:25: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:39:25: Error: No named parameter with the name 'numberOfLegs'.
// Cat2 firstCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 10);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:23:7: Context: The class 'Cat2' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:22:7: Context: The class 'Cat2' has a constructor that takes no arguments.
// class Cat2 implements Animal2 {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:41:26: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:40:26: Error: No named parameter with the name 'numberOfLegs'.
// Cat2 secondCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 10);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:23:7: Context: The class 'Cat2' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:22:7: Context: The class 'Cat2' has a constructor that takes no arguments.
// class Cat2 implements Animal2 {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:42:25: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:41:25: Error: No named parameter with the name 'numberOfLegs'.
// Cat2 thirdCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 0);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:23:7: Context: The class 'Cat2' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:22:7: Context: The class 'Cat2' has a constructor that takes no arguments.
// class Cat2 implements Animal2 {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:9:13: Error: Final field 'numberOfLegs' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:8:13: Error: Final field 'numberOfLegs' is not initialized.
// Try to initialize the field in the declaration or in every constructor.
// final int numberOfLegs;
// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:14:13: Error: Final field 'numberOfLegs' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:13:13: Error: Final field 'numberOfLegs' is not initialized.
// Try to initialize the field in the declaration or in every constructor.
// final int numberOfLegs;
// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:15:13: Error: Final field 'numberOfWhiskers' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:14:13: Error: Final field 'numberOfWhiskers' is not initialized.
// Try to initialize the field in the declaration or in every constructor.
// final int numberOfWhiskers;
// ^^^^^^^^^^^^^^^^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:24:13: Error: Final field 'numberOfLegs' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:23:13: Error: Final field 'numberOfLegs' is not initialized.
// Try to initialize the field in the declaration or in every constructor.
// final int numberOfLegs;
// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:25:13: Error: Final field 'numberOfWhiskers' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:24:13: Error: Final field 'numberOfWhiskers' is not initialized.
// Try to initialize the field in the declaration or in every constructor.
// final int numberOfWhiskers;
// ^^^^^^^^^^^^^^^^
@@ -73,7 +73,6 @@
import "dart:core" as core;
import "value_class_support_lib.dart" as val;
-import "org-dartlang-testcase-sdk:///pkg/front_end/testcases/nnbd_mixed/nnbd_opt_out_language_version.dart";
import "org-dartlang-testcase:///value_class_support_lib.dart";
class Animal extends core::Object {
@@ -119,26 +118,26 @@
return new self::Cat2::•(numberOfLegs: numberOfLegs, numberOfWhiskers: numberOfWhiskers);
}
static method main() → dynamic {
- self::Cat firstCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:30:22: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat firstCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:29:22: Error: No named parameter with the name 'numberOfLegs'.
Cat firstCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
^^^^^^^^^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} self::Cat;
- self::Cat secondCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:31:23: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat secondCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:30:23: Error: No named parameter with the name 'numberOfLegs'.
Cat secondCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
^^^^^^^^^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} self::Cat;
- self::Cat thirdCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:32:22: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat thirdCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:31:22: Error: No named parameter with the name 'numberOfLegs'.
Cat thirdCat = Cat(numberOfLegs: 4, numberOfWhiskers: 0);
^^^^^^^^^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} self::Cat;
self::expect(true, firstCat.{core::Object::==}(secondCat));
self::expect(false, firstCat.{core::Object::==}(thirdCat));
self::expect(true, firstCat.{core::Object::hashCode}.{core::num::==}(secondCat.{core::Object::hashCode}));
self::expect(false, firstCat.{core::Object::hashCode}.{core::num::==}(thirdCat.{core::Object::hashCode}));
- self::Cat2 firstCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:40:25: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat2 firstCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:39:25: Error: No named parameter with the name 'numberOfLegs'.
Cat2 firstCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 10);
^^^^^^^^^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} self::Cat2;
- self::Cat2 secondCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:41:26: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat2 secondCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:40:26: Error: No named parameter with the name 'numberOfLegs'.
Cat2 secondCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 10);
^^^^^^^^^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} self::Cat2;
- self::Cat2 thirdCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:42:25: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat2 thirdCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:41:25: Error: No named parameter with the name 'numberOfLegs'.
Cat2 thirdCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 0);
^^^^^^^^^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} self::Cat2;
self::expect(true, firstCat2.{core::Object::==}(secondCat2));
@@ -151,68 +150,6 @@
throw "Expected=${expected}, actual=${actual}";
}
-library;
-import self as self2;
-import "dart:core" as core;
-
-class late extends core::Object {
- synthetic constructor •() → self2::late*
- : super core::Object::•()
- ;
- get g() → core::int*
- return 1;
- abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
- abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
- abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
- abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
- abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
- abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
- abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
- abstract member-signature method toString() → core::String*; -> core::Object::toString
- abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
- abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-}
-class required extends core::Object {
- synthetic constructor •() → self2::required*
- : super core::Object::•()
- ;
- get g() → core::int*
- return 2;
- abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
- abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
- abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
- abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
- abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
- abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
- abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
- abstract member-signature method toString() → core::String*; -> core::Object::toString
- abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
- abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-}
-class C extends core::Object {
- field self2::late* l = new self2::late::•();
- field self2::required* r = new self2::required::•();
- synthetic constructor •() → self2::C*
- : super core::Object::•()
- ;
- abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
- abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
- abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
- abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
- abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
- abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
- abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
- abstract member-signature method toString() → core::String*; -> core::Object::toString
- abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
- abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-}
-static method main() → dynamic {
- if(!new self2::C::•().{self2::C::l}.{self2::late::g}.{core::num::==}(1))
- throw "Expected 1";
- if(!new self2::C::•().{self2::C::r}.{self2::required::g}.{core::num::==}(2))
- throw "Expected 2";
-}
-
library /*isNonNullableByDefault*/;
import self as val;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/value_class/value_implements_non_value.dart.weak.transformed.expect b/pkg/front_end/testcases/value_class/value_implements_non_value.dart.weak.transformed.expect
index 97545af..dfd6ccf 100644
--- a/pkg/front_end/testcases/value_class/value_implements_non_value.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/value_class/value_implements_non_value.dart.weak.transformed.expect
@@ -2,69 +2,69 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:30:22: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:29:22: Error: No named parameter with the name 'numberOfLegs'.
// Cat firstCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:12:7: Context: The class 'Cat' has a constructor that takes no arguments.
// class Cat implements Animal {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:31:23: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:30:23: Error: No named parameter with the name 'numberOfLegs'.
// Cat secondCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:12:7: Context: The class 'Cat' has a constructor that takes no arguments.
// class Cat implements Animal {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:32:22: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:31:22: Error: No named parameter with the name 'numberOfLegs'.
// Cat thirdCat = Cat(numberOfLegs: 4, numberOfWhiskers: 0);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:12:7: Context: The class 'Cat' has a constructor that takes no arguments.
// class Cat implements Animal {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:40:25: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:39:25: Error: No named parameter with the name 'numberOfLegs'.
// Cat2 firstCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 10);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:23:7: Context: The class 'Cat2' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:22:7: Context: The class 'Cat2' has a constructor that takes no arguments.
// class Cat2 implements Animal2 {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:41:26: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:40:26: Error: No named parameter with the name 'numberOfLegs'.
// Cat2 secondCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 10);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:23:7: Context: The class 'Cat2' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:22:7: Context: The class 'Cat2' has a constructor that takes no arguments.
// class Cat2 implements Animal2 {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:42:25: Error: No named parameter with the name 'numberOfLegs'.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:41:25: Error: No named parameter with the name 'numberOfLegs'.
// Cat2 thirdCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 0);
// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:23:7: Context: The class 'Cat2' has a constructor that takes no arguments.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:22:7: Context: The class 'Cat2' has a constructor that takes no arguments.
// class Cat2 implements Animal2 {
// ^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:9:13: Error: Final field 'numberOfLegs' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:8:13: Error: Final field 'numberOfLegs' is not initialized.
// Try to initialize the field in the declaration or in every constructor.
// final int numberOfLegs;
// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:14:13: Error: Final field 'numberOfLegs' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:13:13: Error: Final field 'numberOfLegs' is not initialized.
// Try to initialize the field in the declaration or in every constructor.
// final int numberOfLegs;
// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:15:13: Error: Final field 'numberOfWhiskers' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:14:13: Error: Final field 'numberOfWhiskers' is not initialized.
// Try to initialize the field in the declaration or in every constructor.
// final int numberOfWhiskers;
// ^^^^^^^^^^^^^^^^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:24:13: Error: Final field 'numberOfLegs' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:23:13: Error: Final field 'numberOfLegs' is not initialized.
// Try to initialize the field in the declaration or in every constructor.
// final int numberOfLegs;
// ^^^^^^^^^^^^
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:25:13: Error: Final field 'numberOfWhiskers' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:24:13: Error: Final field 'numberOfWhiskers' is not initialized.
// Try to initialize the field in the declaration or in every constructor.
// final int numberOfWhiskers;
// ^^^^^^^^^^^^^^^^
@@ -73,7 +73,6 @@
import "dart:core" as core;
import "value_class_support_lib.dart" as val;
-import "org-dartlang-testcase-sdk:///pkg/front_end/testcases/nnbd_mixed/nnbd_opt_out_language_version.dart";
import "org-dartlang-testcase:///value_class_support_lib.dart";
class Animal extends core::Object {
@@ -119,26 +118,26 @@
return new self::Cat2::•(numberOfLegs: numberOfLegs, numberOfWhiskers: numberOfWhiskers);
}
static method main() → dynamic {
- self::Cat firstCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:30:22: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat firstCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:29:22: Error: No named parameter with the name 'numberOfLegs'.
Cat firstCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
^^^^^^^^^^^^";
- self::Cat secondCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:31:23: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat secondCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:30:23: Error: No named parameter with the name 'numberOfLegs'.
Cat secondCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
^^^^^^^^^^^^";
- self::Cat thirdCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:32:22: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat thirdCat = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:31:22: Error: No named parameter with the name 'numberOfLegs'.
Cat thirdCat = Cat(numberOfLegs: 4, numberOfWhiskers: 0);
^^^^^^^^^^^^";
self::expect(true, firstCat.{core::Object::==}(secondCat));
self::expect(false, firstCat.{core::Object::==}(thirdCat));
self::expect(true, firstCat.{core::Object::hashCode}.{core::num::==}(secondCat.{core::Object::hashCode}));
self::expect(false, firstCat.{core::Object::hashCode}.{core::num::==}(thirdCat.{core::Object::hashCode}));
- self::Cat2 firstCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:40:25: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat2 firstCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:39:25: Error: No named parameter with the name 'numberOfLegs'.
Cat2 firstCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 10);
^^^^^^^^^^^^";
- self::Cat2 secondCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:41:26: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat2 secondCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:40:26: Error: No named parameter with the name 'numberOfLegs'.
Cat2 secondCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 10);
^^^^^^^^^^^^";
- self::Cat2 thirdCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:42:25: Error: No named parameter with the name 'numberOfLegs'.
+ self::Cat2 thirdCat2 = invalid-expression "pkg/front_end/testcases/value_class/value_implements_non_value.dart:41:25: Error: No named parameter with the name 'numberOfLegs'.
Cat2 thirdCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 0);
^^^^^^^^^^^^";
self::expect(true, firstCat2.{core::Object::==}(secondCat2));
@@ -151,68 +150,6 @@
throw "Expected=${expected}, actual=${actual}";
}
-library;
-import self as self2;
-import "dart:core" as core;
-
-class late extends core::Object {
- synthetic constructor •() → self2::late*
- : super core::Object::•()
- ;
- get g() → core::int*
- return 1;
- abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
- abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
- abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
- abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
- abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
- abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
- abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
- abstract member-signature method toString() → core::String*; -> core::Object::toString
- abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
- abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-}
-class required extends core::Object {
- synthetic constructor •() → self2::required*
- : super core::Object::•()
- ;
- get g() → core::int*
- return 2;
- abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
- abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
- abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
- abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
- abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
- abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
- abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
- abstract member-signature method toString() → core::String*; -> core::Object::toString
- abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
- abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-}
-class C extends core::Object {
- field self2::late* l = new self2::late::•();
- field self2::required* r = new self2::required::•();
- synthetic constructor •() → self2::C*
- : super core::Object::•()
- ;
- abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
- abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
- abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
- abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
- abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
- abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
- abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
- abstract member-signature method toString() → core::String*; -> core::Object::toString
- abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
- abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
-}
-static method main() → dynamic {
- if(!new self2::C::•().{self2::C::l}.{self2::late::g}.{core::num::==}(1))
- throw "Expected 1";
- if(!new self2::C::•().{self2::C::r}.{self2::required::g}.{core::num::==}(2))
- throw "Expected 2";
-}
-
library /*isNonNullableByDefault*/;
import self as val;
import "dart:core" as core;