Version 2.10.0-101.0.dev
Merge commit 'bd2746189b8d22bdbb867234d7fb14e3be7ab8e0' into 'dev'
diff --git a/DEPS b/DEPS
index 54dc5c4..9ad040a 100644
--- a/DEPS
+++ b/DEPS
@@ -44,7 +44,7 @@
# co19 is a cipd package. Use update.sh in tests/co19[_2] to update these
# hashes. It requires access to the dart-build-access group, which EngProd
# has.
- "co19_rev": "373869fb6ab96191868589e73a13711c31690402",
+ "co19_rev": "c99bc4280fe5ea323c4c937fd073c5e2d17fd975",
"co19_2_rev": "e48b3090826cf40b8037648f19d211e8eab1b4b6",
# The internal benchmarks to use. See go/dart-benchmarks-internal
diff --git a/pkg/front_end/test/spell_checking_list_tests.txt b/pkg/front_end/test/spell_checking_list_tests.txt
index 344c892..a825e87 100644
--- a/pkg/front_end/test/spell_checking_list_tests.txt
+++ b/pkg/front_end/test/spell_checking_list_tests.txt
@@ -335,6 +335,7 @@
it'll
italic
iter
+jlcontreras
joo
jumped
kernels
diff --git a/pkg/front_end/testcases/strong.status b/pkg/front_end/testcases/strong.status
index 88b85b8..524c1c577 100644
--- a/pkg/front_end/testcases/strong.status
+++ b/pkg/front_end/testcases/strong.status
@@ -254,4 +254,5 @@
runtime_checks_new/mixin_forwarding_stub_setter: TypeCheckError
set_literals/disambiguation_rule: RuntimeError
value_class/simple: RuntimeError # Expected
-value_class/super_type: RuntimeError # Expected
\ No newline at end of file
+value_class/value_extends_non_value: RuntimeError # Expected
+value_class/value_implements_non_value: RuntimeError # Expected
\ No newline at end of file
diff --git a/pkg/front_end/testcases/text_serialization.status b/pkg/front_end/testcases/text_serialization.status
index 5e35992..b68d320 100644
--- a/pkg/front_end/testcases/text_serialization.status
+++ b/pkg/front_end/testcases/text_serialization.status
@@ -251,5 +251,5 @@
runtime_checks_new/mixin_forwarding_stub_setter: TypeCheckError
set_literals/disambiguation_rule: RuntimeError
value_class/simple: RuntimeError # Expected
-value_class/super_type: RuntimeError # Expected
-
+value_class/value_extends_non_value: RuntimeError # Expected
+value_class/value_implements_non_value: RuntimeError # Expected
diff --git a/pkg/front_end/testcases/value_class/empty.dart b/pkg/front_end/testcases/value_class/empty.dart
index b54e437..61879b1 100644
--- a/pkg/front_end/testcases/value_class/empty.dart
+++ b/pkg/front_end/testcases/value_class/empty.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-const String valueClass = "valueClass";
+import 'value_class_support_lib.dart';
@valueClass
class EmptyClass {}
diff --git a/pkg/front_end/testcases/value_class/empty.dart.outline.expect b/pkg/front_end/testcases/value_class/empty.dart.outline.expect
index e608a1a..8eabbff 100644
--- a/pkg/front_end/testcases/value_class/empty.dart.outline.expect
+++ b/pkg/front_end/testcases/value_class/empty.dart.outline.expect
@@ -1,12 +1,28 @@
library /*isNonNullableByDefault*/;
import self as self;
+import "value_class_support_lib.dart" as val;
import "dart:core" as core;
-@self::valueClass
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
+@val::valueClass
class EmptyClass extends core::Object {
synthetic constructor •() → self::EmptyClass
;
}
-static const field core::String valueClass = "valueClass";
static method main() → dynamic
;
+
+library /*isNonNullableByDefault*/;
+import self as val;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → val::JenkinsSmiHash
+ ;
+ static method combine(core::int hash, core::int value) → core::int
+ ;
+ static method finish(core::int hash) → core::int
+ ;
+}
+static const field core::String valueClass = "valueClass";
diff --git a/pkg/front_end/testcases/value_class/empty.dart.strong.expect b/pkg/front_end/testcases/value_class/empty.dart.strong.expect
index 969be0d..ae881d2 100644
--- a/pkg/front_end/testcases/value_class/empty.dart.strong.expect
+++ b/pkg/front_end/testcases/value_class/empty.dart.strong.expect
@@ -2,14 +2,36 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class EmptyClass extends core::Object {
synthetic constructor •() → self::EmptyClass
: super core::Object::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/empty.dart.strong.transformed.expect b/pkg/front_end/testcases/value_class/empty.dart.strong.transformed.expect
index 969be0d..ae881d2 100644
--- a/pkg/front_end/testcases/value_class/empty.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/value_class/empty.dart.strong.transformed.expect
@@ -2,14 +2,36 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class EmptyClass extends core::Object {
synthetic constructor •() → self::EmptyClass
: super core::Object::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/empty.dart.textual_outline.expect b/pkg/front_end/testcases/value_class/empty.dart.textual_outline.expect
index 5716b5d..ee13e4a 100644
--- a/pkg/front_end/testcases/value_class/empty.dart.textual_outline.expect
+++ b/pkg/front_end/testcases/value_class/empty.dart.textual_outline.expect
@@ -1,4 +1,4 @@
-const String valueClass = "valueClass";
+import 'value_class_support_lib.dart';
@valueClass
class EmptyClass {}
diff --git a/pkg/front_end/testcases/value_class/empty.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/value_class/empty.dart.textual_outline_modelled.expect
index 3137333..ee13e4a 100644
--- a/pkg/front_end/testcases/value_class/empty.dart.textual_outline_modelled.expect
+++ b/pkg/front_end/testcases/value_class/empty.dart.textual_outline_modelled.expect
@@ -1,5 +1,6 @@
+import 'value_class_support_lib.dart';
+
@valueClass
class EmptyClass {}
-const String valueClass = "valueClass";
main() {}
diff --git a/pkg/front_end/testcases/value_class/empty.dart.weak.expect b/pkg/front_end/testcases/value_class/empty.dart.weak.expect
index 969be0d..ae881d2 100644
--- a/pkg/front_end/testcases/value_class/empty.dart.weak.expect
+++ b/pkg/front_end/testcases/value_class/empty.dart.weak.expect
@@ -2,14 +2,36 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class EmptyClass extends core::Object {
synthetic constructor •() → self::EmptyClass
: super core::Object::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/empty.dart.weak.transformed.expect b/pkg/front_end/testcases/value_class/empty.dart.weak.transformed.expect
index 969be0d..ae881d2 100644
--- a/pkg/front_end/testcases/value_class/empty.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/value_class/empty.dart.weak.transformed.expect
@@ -2,14 +2,36 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class EmptyClass extends core::Object {
synthetic constructor •() → self::EmptyClass
: super core::Object::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/explicit_mixin.dart b/pkg/front_end/testcases/value_class/explicit_mixin.dart
index 5dadbc8..47b83d5 100644
--- a/pkg/front_end/testcases/value_class/explicit_mixin.dart
+++ b/pkg/front_end/testcases/value_class/explicit_mixin.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-const String valueClass = "valueClass";
+import 'value_class_support_lib.dart';
@valueClass
class A {}
diff --git a/pkg/front_end/testcases/value_class/explicit_mixin.dart.outline.expect b/pkg/front_end/testcases/value_class/explicit_mixin.dart.outline.expect
index 0299405..1186e41 100644
--- a/pkg/front_end/testcases/value_class/explicit_mixin.dart.outline.expect
+++ b/pkg/front_end/testcases/value_class/explicit_mixin.dart.outline.expect
@@ -1,8 +1,11 @@
library /*isNonNullableByDefault*/;
import self as self;
+import "value_class_support_lib.dart" as val;
import "dart:core" as core;
-@self::valueClass
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
+@val::valueClass
class A extends core::Object {
synthetic constructor •() → self::A
;
@@ -25,12 +28,25 @@
: super self::B::•()
;
}
-@self::valueClass
+@val::valueClass
class F = self::B with self::C {
synthetic constructor •() → self::F
: super self::B::•()
;
}
-static const field core::String valueClass = "valueClass";
static method main() → dynamic
;
+
+library /*isNonNullableByDefault*/;
+import self as val;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → val::JenkinsSmiHash
+ ;
+ static method combine(core::int hash, core::int value) → core::int
+ ;
+ static method finish(core::int hash) → core::int
+ ;
+}
+static const field core::String valueClass = "valueClass";
diff --git a/pkg/front_end/testcases/value_class/explicit_mixin.dart.strong.expect b/pkg/front_end/testcases/value_class/explicit_mixin.dart.strong.expect
index 38e8d0c..028ea9c 100644
--- a/pkg/front_end/testcases/value_class/explicit_mixin.dart.strong.expect
+++ b/pkg/front_end/testcases/value_class/explicit_mixin.dart.strong.expect
@@ -2,6 +2,8 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class A extends core::Object {
synthetic constructor •() → self::A
: super core::Object::•()
@@ -32,9 +34,29 @@
: super self::B::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/explicit_mixin.dart.strong.transformed.expect b/pkg/front_end/testcases/value_class/explicit_mixin.dart.strong.transformed.expect
index 1203e0a..748d548 100644
--- a/pkg/front_end/testcases/value_class/explicit_mixin.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/value_class/explicit_mixin.dart.strong.transformed.expect
@@ -2,6 +2,8 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class A extends core::Object {
synthetic constructor •() → self::A
: super core::Object::•()
@@ -32,9 +34,29 @@
: super self::B::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/explicit_mixin.dart.textual_outline.expect b/pkg/front_end/testcases/value_class/explicit_mixin.dart.textual_outline.expect
index 2b99804..aea6151 100644
--- a/pkg/front_end/testcases/value_class/explicit_mixin.dart.textual_outline.expect
+++ b/pkg/front_end/testcases/value_class/explicit_mixin.dart.textual_outline.expect
@@ -1,4 +1,4 @@
-const String valueClass = "valueClass";
+import 'value_class_support_lib.dart';
@valueClass
class A {}
diff --git a/pkg/front_end/testcases/value_class/explicit_mixin.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/value_class/explicit_mixin.dart.textual_outline_modelled.expect
index bc846e0..aea6151 100644
--- a/pkg/front_end/testcases/value_class/explicit_mixin.dart.textual_outline_modelled.expect
+++ b/pkg/front_end/testcases/value_class/explicit_mixin.dart.textual_outline_modelled.expect
@@ -1,3 +1,5 @@
+import 'value_class_support_lib.dart';
+
@valueClass
class A {}
@@ -9,5 +11,4 @@
class E = B with A;
@valueClass
class F = B with C;
-const String valueClass = "valueClass";
main() {}
diff --git a/pkg/front_end/testcases/value_class/explicit_mixin.dart.weak.expect b/pkg/front_end/testcases/value_class/explicit_mixin.dart.weak.expect
index 38e8d0c..028ea9c 100644
--- a/pkg/front_end/testcases/value_class/explicit_mixin.dart.weak.expect
+++ b/pkg/front_end/testcases/value_class/explicit_mixin.dart.weak.expect
@@ -2,6 +2,8 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class A extends core::Object {
synthetic constructor •() → self::A
: super core::Object::•()
@@ -32,9 +34,29 @@
: super self::B::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/explicit_mixin.dart.weak.transformed.expect b/pkg/front_end/testcases/value_class/explicit_mixin.dart.weak.transformed.expect
index 1203e0a..748d548 100644
--- a/pkg/front_end/testcases/value_class/explicit_mixin.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/value_class/explicit_mixin.dart.weak.transformed.expect
@@ -2,6 +2,8 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class A extends core::Object {
synthetic constructor •() → self::A
: super core::Object::•()
@@ -32,9 +34,29 @@
: super self::B::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/non_final_field_error.dart b/pkg/front_end/testcases/value_class/non_final_field_error.dart
index b9ac3c4..8d5df37 100644
--- a/pkg/front_end/testcases/value_class/non_final_field_error.dart
+++ b/pkg/front_end/testcases/value_class/non_final_field_error.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-const String valueClass = "valueClass";
+import 'value_class_support_lib.dart';
@valueClass
class Animal {
diff --git a/pkg/front_end/testcases/value_class/non_final_field_error.dart.outline.expect b/pkg/front_end/testcases/value_class/non_final_field_error.dart.outline.expect
index 2b8fa05..c7f8eba 100644
--- a/pkg/front_end/testcases/value_class/non_final_field_error.dart.outline.expect
+++ b/pkg/front_end/testcases/value_class/non_final_field_error.dart.outline.expect
@@ -1,13 +1,29 @@
library /*isNonNullableByDefault*/;
import self as self;
+import "value_class_support_lib.dart" as val;
import "dart:core" as core;
-@self::valueClass
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
+@val::valueClass
class Animal extends core::Object {
field core::int numberOfLegs;
synthetic constructor •() → self::Animal
;
}
-static const field core::String valueClass = "valueClass";
static method main() → dynamic
;
+
+library /*isNonNullableByDefault*/;
+import self as val;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → val::JenkinsSmiHash
+ ;
+ static method combine(core::int hash, core::int value) → core::int
+ ;
+ static method finish(core::int hash) → core::int
+ ;
+}
+static const field core::String valueClass = "valueClass";
diff --git a/pkg/front_end/testcases/value_class/non_final_field_error.dart.strong.expect b/pkg/front_end/testcases/value_class/non_final_field_error.dart.strong.expect
index c7c00ed..8cacedc 100644
--- a/pkg/front_end/testcases/value_class/non_final_field_error.dart.strong.expect
+++ b/pkg/front_end/testcases/value_class/non_final_field_error.dart.strong.expect
@@ -9,15 +9,37 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
field core::int numberOfLegs = null;
synthetic constructor •({required core::int numberOfLegs}) → self::Animal
: self::Animal::numberOfLegs = numberOfLegs, super core::Object::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/non_final_field_error.dart.strong.transformed.expect b/pkg/front_end/testcases/value_class/non_final_field_error.dart.strong.transformed.expect
index c7c00ed..8cacedc 100644
--- a/pkg/front_end/testcases/value_class/non_final_field_error.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/value_class/non_final_field_error.dart.strong.transformed.expect
@@ -9,15 +9,37 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
field core::int numberOfLegs = null;
synthetic constructor •({required core::int numberOfLegs}) → self::Animal
: self::Animal::numberOfLegs = numberOfLegs, super core::Object::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/non_final_field_error.dart.textual_outline.expect b/pkg/front_end/testcases/value_class/non_final_field_error.dart.textual_outline.expect
index f3e2971..4d187ed 100644
--- a/pkg/front_end/testcases/value_class/non_final_field_error.dart.textual_outline.expect
+++ b/pkg/front_end/testcases/value_class/non_final_field_error.dart.textual_outline.expect
@@ -1,4 +1,4 @@
-const String valueClass = "valueClass";
+import 'value_class_support_lib.dart';
@valueClass
class Animal {
diff --git a/pkg/front_end/testcases/value_class/non_final_field_error.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/value_class/non_final_field_error.dart.textual_outline_modelled.expect
index 8e62800..4d187ed 100644
--- a/pkg/front_end/testcases/value_class/non_final_field_error.dart.textual_outline_modelled.expect
+++ b/pkg/front_end/testcases/value_class/non_final_field_error.dart.textual_outline_modelled.expect
@@ -1,7 +1,8 @@
+import 'value_class_support_lib.dart';
+
@valueClass
class Animal {
int numberOfLegs;
}
-const String valueClass = "valueClass";
main() {}
diff --git a/pkg/front_end/testcases/value_class/non_final_field_error.dart.weak.expect b/pkg/front_end/testcases/value_class/non_final_field_error.dart.weak.expect
index c7c00ed..8cacedc 100644
--- a/pkg/front_end/testcases/value_class/non_final_field_error.dart.weak.expect
+++ b/pkg/front_end/testcases/value_class/non_final_field_error.dart.weak.expect
@@ -9,15 +9,37 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
field core::int numberOfLegs = null;
synthetic constructor •({required core::int numberOfLegs}) → self::Animal
: self::Animal::numberOfLegs = numberOfLegs, super core::Object::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/non_final_field_error.dart.weak.transformed.expect b/pkg/front_end/testcases/value_class/non_final_field_error.dart.weak.transformed.expect
index c7c00ed..8cacedc 100644
--- a/pkg/front_end/testcases/value_class/non_final_field_error.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/value_class/non_final_field_error.dart.weak.transformed.expect
@@ -9,15 +9,37 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
field core::int numberOfLegs = null;
synthetic constructor •({required core::int numberOfLegs}) → self::Animal
: self::Animal::numberOfLegs = numberOfLegs, super core::Object::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart b/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart
index e7ab504..1041007 100644
--- a/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart
+++ b/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-const String valueClass = "valueClass";
+import 'value_class_support_lib.dart';
@valueClass
class Animal {
diff --git a/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.outline.expect b/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.outline.expect
index df9e66f..cabfc54 100644
--- a/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.outline.expect
+++ b/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.outline.expect
@@ -1,8 +1,11 @@
library /*isNonNullableByDefault*/;
import self as self;
+import "value_class_support_lib.dart" as val;
import "dart:core" as core;
-@self::valueClass
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
+@val::valueClass
class Animal extends core::Object {
final field core::int numberOfLegs;
synthetic constructor •() → self::Animal
@@ -12,6 +15,19 @@
synthetic constructor •() → self::Cat
;
}
-static const field core::String valueClass = "valueClass";
static method main() → dynamic
;
+
+library /*isNonNullableByDefault*/;
+import self as val;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → val::JenkinsSmiHash
+ ;
+ static method combine(core::int hash, core::int value) → core::int
+ ;
+ static method finish(core::int hash) → core::int
+ ;
+}
+static const field core::String valueClass = "valueClass";
diff --git a/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.strong.expect b/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.strong.expect
index 8ba63ea..60b3565 100644
--- a/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.strong.expect
+++ b/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.strong.expect
@@ -10,6 +10,8 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
final field core::int numberOfLegs = null;
synthetic constructor •({required core::int numberOfLegs}) → self::Animal
@@ -21,9 +23,29 @@
: super self::Animal::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.strong.transformed.expect b/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.strong.transformed.expect
index 8ba63ea..60b3565 100644
--- a/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.strong.transformed.expect
@@ -10,6 +10,8 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
final field core::int numberOfLegs = null;
synthetic constructor •({required core::int numberOfLegs}) → self::Animal
@@ -21,9 +23,29 @@
: super self::Animal::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.textual_outline.expect b/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.textual_outline.expect
index 0394cbe..36726f0e 100644
--- a/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.textual_outline.expect
+++ b/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.textual_outline.expect
@@ -1,4 +1,4 @@
-const String valueClass = "valueClass";
+import 'value_class_support_lib.dart';
@valueClass
class Animal {
diff --git a/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.textual_outline_modelled.expect
index 93eb8a7..36726f0e 100644
--- a/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.textual_outline_modelled.expect
+++ b/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.textual_outline_modelled.expect
@@ -1,3 +1,5 @@
+import 'value_class_support_lib.dart';
+
@valueClass
class Animal {
final int numberOfLegs;
@@ -5,5 +7,4 @@
class Cat extends Animal {}
-const String valueClass = "valueClass";
main() {}
diff --git a/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.weak.expect b/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.weak.expect
index 8ba63ea..60b3565 100644
--- a/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.weak.expect
+++ b/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.weak.expect
@@ -10,6 +10,8 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
final field core::int numberOfLegs = null;
synthetic constructor •({required core::int numberOfLegs}) → self::Animal
@@ -21,9 +23,29 @@
: super self::Animal::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.weak.transformed.expect b/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.weak.transformed.expect
index 8ba63ea..60b3565 100644
--- a/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/value_class/non_value_extends_value_error.dart.weak.transformed.expect
@@ -10,6 +10,8 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
final field core::int numberOfLegs = null;
synthetic constructor •({required core::int numberOfLegs}) → self::Animal
@@ -21,9 +23,29 @@
: super self::Animal::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart b/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart
index f86c562..62833f1 100644
--- a/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart
+++ b/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-const String valueClass = "valueClass";
+import 'value_class_support_lib.dart';
@valueClass
class Animal {
diff --git a/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.outline.expect b/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.outline.expect
index bc92132..26f4715 100644
--- a/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.outline.expect
+++ b/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.outline.expect
@@ -1,8 +1,11 @@
library /*isNonNullableByDefault*/;
import self as self;
+import "value_class_support_lib.dart" as val;
import "dart:core" as core;
-@self::valueClass
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
+@val::valueClass
class Animal extends core::Object {
final field core::int numberOfLegs;
synthetic constructor •() → self::Animal
@@ -13,6 +16,19 @@
synthetic constructor •() → self::Cat
;
}
-static const field core::String valueClass = "valueClass";
static method main() → dynamic
;
+
+library /*isNonNullableByDefault*/;
+import self as val;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → val::JenkinsSmiHash
+ ;
+ static method combine(core::int hash, core::int value) → core::int
+ ;
+ static method finish(core::int hash) → core::int
+ ;
+}
+static const field core::String valueClass = "valueClass";
diff --git a/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.strong.expect b/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.strong.expect
index 15fac95..121eef2 100644
--- a/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.strong.expect
+++ b/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.strong.expect
@@ -15,6 +15,8 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
final field core::int numberOfLegs = null;
synthetic constructor •({required core::int numberOfLegs}) → self::Animal
@@ -27,9 +29,29 @@
: super core::Object::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.strong.transformed.expect b/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.strong.transformed.expect
index 15fac95..121eef2 100644
--- a/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.strong.transformed.expect
@@ -15,6 +15,8 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
final field core::int numberOfLegs = null;
synthetic constructor •({required core::int numberOfLegs}) → self::Animal
@@ -27,9 +29,29 @@
: super core::Object::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.textual_outline.expect b/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.textual_outline.expect
index 21b0351..9b11839 100644
--- a/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.textual_outline.expect
+++ b/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.textual_outline.expect
@@ -1,4 +1,4 @@
-const String valueClass = "valueClass";
+import 'value_class_support_lib.dart';
@valueClass
class Animal {
diff --git a/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.textual_outline_modelled.expect
index fd4d61a..9b11839 100644
--- a/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.textual_outline_modelled.expect
+++ b/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.textual_outline_modelled.expect
@@ -1,3 +1,5 @@
+import 'value_class_support_lib.dart';
+
@valueClass
class Animal {
final int numberOfLegs;
@@ -7,5 +9,4 @@
final int numberOfLegs;
}
-const String valueClass = "valueClass";
main() {}
diff --git a/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.weak.expect b/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.weak.expect
index 15fac95..121eef2 100644
--- a/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.weak.expect
+++ b/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.weak.expect
@@ -15,6 +15,8 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
final field core::int numberOfLegs = null;
synthetic constructor •({required core::int numberOfLegs}) → self::Animal
@@ -27,9 +29,29 @@
: super core::Object::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.weak.transformed.expect b/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.weak.transformed.expect
index 15fac95..121eef2 100644
--- a/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/value_class/non_value_implements_value_error.dart.weak.transformed.expect
@@ -15,6 +15,8 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
final field core::int numberOfLegs = null;
synthetic constructor •({required core::int numberOfLegs}) → self::Animal
@@ -27,9 +29,29 @@
: super core::Object::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/simple.dart b/pkg/front_end/testcases/value_class/simple.dart
index c2b4107..a90d369 100644
--- a/pkg/front_end/testcases/value_class/simple.dart
+++ b/pkg/front_end/testcases/value_class/simple.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-const String valueClass = "valueClass";
+import 'value_class_support_lib.dart';
@valueClass
class Animal {
@@ -21,11 +21,6 @@
expect(false, firstAnimal.hashCode == thirdAnimal.hashCode);
}
-expect(expected, actual, [expectNull = false]) {
- if (expectNull) {
- expected = null;
- }
- if (expected != actual) {
- throw 'Mismatch: expected=$expected, actual=$actual';
- }
+expect(Object? expected, Object? actual) {
+ if (expected != actual) throw 'Expected=$expected, actual=$actual';
}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/value_class/simple.dart.outline.expect b/pkg/front_end/testcases/value_class/simple.dart.outline.expect
index 14f3e52..ffcabdf 100644
--- a/pkg/front_end/testcases/value_class/simple.dart.outline.expect
+++ b/pkg/front_end/testcases/value_class/simple.dart.outline.expect
@@ -1,15 +1,31 @@
library /*isNonNullableByDefault*/;
import self as self;
+import "value_class_support_lib.dart" as val;
import "dart:core" as core;
-@self::valueClass
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
+@val::valueClass
class Animal extends core::Object {
final field core::int numberOfLegs;
synthetic constructor •() → self::Animal
;
}
-static const field core::String valueClass = "valueClass";
static method main() → dynamic
;
-static method expect(dynamic expected, dynamic actual, [dynamic expectNull]) → dynamic
+static method expect(core::Object? expected, core::Object? actual) → dynamic
;
+
+library /*isNonNullableByDefault*/;
+import self as val;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → val::JenkinsSmiHash
+ ;
+ static method combine(core::int hash, core::int value) → core::int
+ ;
+ static method finish(core::int hash) → core::int
+ ;
+}
+static const field core::String valueClass = "valueClass";
diff --git a/pkg/front_end/testcases/value_class/simple.dart.strong.expect b/pkg/front_end/testcases/value_class/simple.dart.strong.expect
index c9eb762..49fa098 100644
--- a/pkg/front_end/testcases/value_class/simple.dart.strong.expect
+++ b/pkg/front_end/testcases/value_class/simple.dart.strong.expect
@@ -31,13 +31,14 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
final field core::int numberOfLegs = null;
synthetic constructor •({required core::int numberOfLegs}) → self::Animal
: self::Animal::numberOfLegs = numberOfLegs, super core::Object::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {
self::Animal firstAnimal = invalid-expression "pkg/front_end/testcases/value_class/simple.dart:13:31: Error: No named parameter with the name 'numberOfLegs'.
Animal firstAnimal = Animal(numberOfLegs: 4);
@@ -53,16 +54,32 @@
self::expect(true, firstAnimal.{core::Object::hashCode}.{core::num::==}(secondAnimal.{core::Object::hashCode}));
self::expect(false, firstAnimal.{core::Object::hashCode}.{core::num::==}(thirdAnimal.{core::Object::hashCode}));
}
-static method expect(dynamic expected, dynamic actual, [dynamic expectNull = #C2]) → dynamic {
- if(expectNull as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
- expected = null;
+static method expect(core::Object? expected, core::Object? actual) → dynamic {
+ if(!expected.{core::Object::==}(actual))
+ throw "Expected=${expected}, actual=${actual}";
+}
+
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
}
- if(!expected.{core::Object::==}(actual)) {
- throw "Mismatch: expected=${expected}, actual=${actual}";
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
}
}
+static const field core::String valueClass = #C1;
constants {
#C1 = "valueClass"
- #C2 = false
}
diff --git a/pkg/front_end/testcases/value_class/simple.dart.strong.transformed.expect b/pkg/front_end/testcases/value_class/simple.dart.strong.transformed.expect
index 344eb6f..178b102 100644
--- a/pkg/front_end/testcases/value_class/simple.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/value_class/simple.dart.strong.transformed.expect
@@ -31,13 +31,14 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
final field core::int numberOfLegs = null;
synthetic constructor •({required core::int numberOfLegs}) → self::Animal
: self::Animal::numberOfLegs = numberOfLegs, super core::Object::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {
self::Animal firstAnimal = invalid-expression "pkg/front_end/testcases/value_class/simple.dart:13:31: Error: No named parameter with the name 'numberOfLegs'.
Animal firstAnimal = Animal(numberOfLegs: 4);
@@ -53,16 +54,32 @@
self::expect(true, firstAnimal.{core::Object::hashCode}.{core::num::==}(secondAnimal.{core::Object::hashCode}));
self::expect(false, firstAnimal.{core::Object::hashCode}.{core::num::==}(thirdAnimal.{core::Object::hashCode}));
}
-static method expect(dynamic expected, dynamic actual, [dynamic expectNull = #C2]) → dynamic {
- if(expectNull as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
- expected = null;
+static method expect(core::Object? expected, core::Object? actual) → dynamic {
+ if(!expected.{core::Object::==}(actual))
+ throw "Expected=${expected}, actual=${actual}";
+}
+
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
}
- if(!expected.{core::Object::==}(actual)) {
- throw "Mismatch: expected=${expected}, actual=${actual}";
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
}
}
+static const field core::String valueClass = #C1;
constants {
#C1 = "valueClass"
- #C2 = false
}
diff --git a/pkg/front_end/testcases/value_class/simple.dart.textual_outline.expect b/pkg/front_end/testcases/value_class/simple.dart.textual_outline.expect
index 318ea62..bc12906 100644
--- a/pkg/front_end/testcases/value_class/simple.dart.textual_outline.expect
+++ b/pkg/front_end/testcases/value_class/simple.dart.textual_outline.expect
@@ -1,4 +1,4 @@
-const String valueClass = "valueClass";
+import 'value_class_support_lib.dart';
@valueClass
class Animal {
@@ -6,4 +6,4 @@
}
main() {}
-expect(expected, actual, [expectNull = false]) {}
+expect(Object? expected, Object? actual) {}
diff --git a/pkg/front_end/testcases/value_class/simple.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/value_class/simple.dart.textual_outline_modelled.expect
index 05032a9..9cc375c 100644
--- a/pkg/front_end/testcases/value_class/simple.dart.textual_outline_modelled.expect
+++ b/pkg/front_end/testcases/value_class/simple.dart.textual_outline_modelled.expect
@@ -1,8 +1,9 @@
+import 'value_class_support_lib.dart';
+
@valueClass
class Animal {
final int numberOfLegs;
}
-const String valueClass = "valueClass";
-expect(expected, actual, [expectNull = false]) {}
+expect(Object? expected, Object? actual) {}
main() {}
diff --git a/pkg/front_end/testcases/value_class/simple.dart.weak.expect b/pkg/front_end/testcases/value_class/simple.dart.weak.expect
index c9eb762..49fa098 100644
--- a/pkg/front_end/testcases/value_class/simple.dart.weak.expect
+++ b/pkg/front_end/testcases/value_class/simple.dart.weak.expect
@@ -31,13 +31,14 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
final field core::int numberOfLegs = null;
synthetic constructor •({required core::int numberOfLegs}) → self::Animal
: self::Animal::numberOfLegs = numberOfLegs, super core::Object::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {
self::Animal firstAnimal = invalid-expression "pkg/front_end/testcases/value_class/simple.dart:13:31: Error: No named parameter with the name 'numberOfLegs'.
Animal firstAnimal = Animal(numberOfLegs: 4);
@@ -53,16 +54,32 @@
self::expect(true, firstAnimal.{core::Object::hashCode}.{core::num::==}(secondAnimal.{core::Object::hashCode}));
self::expect(false, firstAnimal.{core::Object::hashCode}.{core::num::==}(thirdAnimal.{core::Object::hashCode}));
}
-static method expect(dynamic expected, dynamic actual, [dynamic expectNull = #C2]) → dynamic {
- if(expectNull as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
- expected = null;
+static method expect(core::Object? expected, core::Object? actual) → dynamic {
+ if(!expected.{core::Object::==}(actual))
+ throw "Expected=${expected}, actual=${actual}";
+}
+
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
}
- if(!expected.{core::Object::==}(actual)) {
- throw "Mismatch: expected=${expected}, actual=${actual}";
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
}
}
+static const field core::String valueClass = #C1;
constants {
#C1 = "valueClass"
- #C2 = false
}
diff --git a/pkg/front_end/testcases/value_class/simple.dart.weak.transformed.expect b/pkg/front_end/testcases/value_class/simple.dart.weak.transformed.expect
index 344eb6f..178b102 100644
--- a/pkg/front_end/testcases/value_class/simple.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/value_class/simple.dart.weak.transformed.expect
@@ -31,13 +31,14 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
final field core::int numberOfLegs = null;
synthetic constructor •({required core::int numberOfLegs}) → self::Animal
: self::Animal::numberOfLegs = numberOfLegs, super core::Object::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {
self::Animal firstAnimal = invalid-expression "pkg/front_end/testcases/value_class/simple.dart:13:31: Error: No named parameter with the name 'numberOfLegs'.
Animal firstAnimal = Animal(numberOfLegs: 4);
@@ -53,16 +54,32 @@
self::expect(true, firstAnimal.{core::Object::hashCode}.{core::num::==}(secondAnimal.{core::Object::hashCode}));
self::expect(false, firstAnimal.{core::Object::hashCode}.{core::num::==}(thirdAnimal.{core::Object::hashCode}));
}
-static method expect(dynamic expected, dynamic actual, [dynamic expectNull = #C2]) → dynamic {
- if(expectNull as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
- expected = null;
+static method expect(core::Object? expected, core::Object? actual) → dynamic {
+ if(!expected.{core::Object::==}(actual))
+ throw "Expected=${expected}, actual=${actual}";
+}
+
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
}
- if(!expected.{core::Object::==}(actual)) {
- throw "Mismatch: expected=${expected}, actual=${actual}";
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
}
}
+static const field core::String valueClass = #C1;
constants {
#C1 = "valueClass"
- #C2 = false
}
diff --git a/pkg/front_end/testcases/value_class/super_type.dart b/pkg/front_end/testcases/value_class/super_type.dart
deleted file mode 100644
index 10dad24..0000000
--- a/pkg/front_end/testcases/value_class/super_type.dart
+++ /dev/null
@@ -1,37 +0,0 @@
-// 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.
-
-const String valueClass = "valueClass";
-
-@valueClass
-class Animal {
- final int numberOfLegs;
-}
-
-@valueClass
-class Cat implements Animal {
- final int numberOfLegs;
- final int numberOfWhiskers;
-}
-
-main() {
- Cat firstCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
- Cat secondCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
- Cat thirdCat = Cat(numberOfLegs: 4, numberOfWhiskers: 0);
-
- expect(true, firstCat == secondCat);
- expect(false, firstCat == thirdCat);
-
- expect(true, firstCat.hashCode == secondCat.hashCode);
- expect(false, firstCat.hashCode == thirdCat.hashCode);
-}
-
-expect(expected, actual, [expectNull = false]) {
- if (expectNull) {
- expected = null;
- }
- if (expected != actual) {
- throw 'Mismatch: expected=$expected, actual=$actual';
- }
-}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/value_class/super_type.dart.outline.expect b/pkg/front_end/testcases/value_class/super_type.dart.outline.expect
deleted file mode 100644
index 5256842..0000000
--- a/pkg/front_end/testcases/value_class/super_type.dart.outline.expect
+++ /dev/null
@@ -1,22 +0,0 @@
-library /*isNonNullableByDefault*/;
-import self as self;
-import "dart:core" as core;
-
-@self::valueClass
-class Animal extends core::Object {
- final field core::int numberOfLegs;
- synthetic constructor •() → self::Animal
- ;
-}
-@self::valueClass
-class Cat extends core::Object implements self::Animal {
- final field core::int numberOfLegs;
- final field core::int numberOfWhiskers;
- synthetic constructor •() → self::Cat
- ;
-}
-static const field core::String valueClass = "valueClass";
-static method main() → dynamic
- ;
-static method expect(dynamic expected, dynamic actual, [dynamic expectNull]) → dynamic
- ;
diff --git a/pkg/front_end/testcases/value_class/super_type.dart.strong.expect b/pkg/front_end/testcases/value_class/super_type.dart.strong.expect
deleted file mode 100644
index 63760688..0000000
--- a/pkg/front_end/testcases/value_class/super_type.dart.strong.expect
+++ /dev/null
@@ -1,85 +0,0 @@
-library /*isNonNullableByDefault*/;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/value_class/super_type.dart:19:22: Error: No named parameter with the name 'numberOfLegs'.
-// Cat firstCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
-// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/super_type.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
-// class Cat implements Animal {
-// ^
-//
-// pkg/front_end/testcases/value_class/super_type.dart:20:23: Error: No named parameter with the name 'numberOfLegs'.
-// Cat secondCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
-// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/super_type.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
-// class Cat implements Animal {
-// ^
-//
-// pkg/front_end/testcases/value_class/super_type.dart:21:22: Error: No named parameter with the name 'numberOfLegs'.
-// Cat thirdCat = Cat(numberOfLegs: 4, numberOfWhiskers: 0);
-// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/super_type.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
-// class Cat implements Animal {
-// ^
-//
-// pkg/front_end/testcases/value_class/super_type.dart:9: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/super_type.dart:14: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/super_type.dart:15:13: Error: Final field 'numberOfWhiskers' is not initialized.
-// Try to initialize the field in the declaration or in every constructor.
-// final int numberOfWhiskers;
-// ^^^^^^^^^^^^^^^^
-//
-import self as self;
-import "dart:core" as core;
-
-class Animal extends core::Object {
- final field core::int numberOfLegs = null;
- synthetic constructor •({required core::int numberOfLegs}) → self::Animal
- : self::Animal::numberOfLegs = numberOfLegs, super core::Object::•()
- ;
-}
-class Cat extends core::Object implements self::Animal {
- final field core::int numberOfLegs = null;
- final field core::int numberOfWhiskers = null;
- synthetic constructor •({required core::int numberOfLegs, required core::int numberOfWhiskers}) → self::Cat
- : self::Cat::numberOfLegs = numberOfLegs, self::Cat::numberOfWhiskers = numberOfWhiskers, super core::Object::•()
- ;
-}
-static const field core::String valueClass = #C1;
-static method main() → dynamic {
- self::Cat firstCat = invalid-expression "pkg/front_end/testcases/value_class/super_type.dart:19: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/super_type.dart:20: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/super_type.dart:21: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}));
-}
-static method expect(dynamic expected, dynamic actual, [dynamic expectNull = #C2]) → dynamic {
- if(expectNull as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
- expected = null;
- }
- if(!expected.{core::Object::==}(actual)) {
- throw "Mismatch: expected=${expected}, actual=${actual}";
- }
-}
-
-constants {
- #C1 = "valueClass"
- #C2 = false
-}
diff --git a/pkg/front_end/testcases/value_class/super_type.dart.strong.transformed.expect b/pkg/front_end/testcases/value_class/super_type.dart.strong.transformed.expect
deleted file mode 100644
index fdbcb96..0000000
--- a/pkg/front_end/testcases/value_class/super_type.dart.strong.transformed.expect
+++ /dev/null
@@ -1,85 +0,0 @@
-library /*isNonNullableByDefault*/;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/value_class/super_type.dart:19:22: Error: No named parameter with the name 'numberOfLegs'.
-// Cat firstCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
-// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/super_type.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
-// class Cat implements Animal {
-// ^
-//
-// pkg/front_end/testcases/value_class/super_type.dart:20:23: Error: No named parameter with the name 'numberOfLegs'.
-// Cat secondCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
-// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/super_type.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
-// class Cat implements Animal {
-// ^
-//
-// pkg/front_end/testcases/value_class/super_type.dart:21:22: Error: No named parameter with the name 'numberOfLegs'.
-// Cat thirdCat = Cat(numberOfLegs: 4, numberOfWhiskers: 0);
-// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/super_type.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
-// class Cat implements Animal {
-// ^
-//
-// pkg/front_end/testcases/value_class/super_type.dart:9: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/super_type.dart:14: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/super_type.dart:15:13: Error: Final field 'numberOfWhiskers' is not initialized.
-// Try to initialize the field in the declaration or in every constructor.
-// final int numberOfWhiskers;
-// ^^^^^^^^^^^^^^^^
-//
-import self as self;
-import "dart:core" as core;
-
-class Animal extends core::Object {
- final field core::int numberOfLegs = null;
- synthetic constructor •({required core::int numberOfLegs}) → self::Animal
- : self::Animal::numberOfLegs = numberOfLegs, super core::Object::•()
- ;
-}
-class Cat extends core::Object implements self::Animal {
- final field core::int numberOfLegs = null;
- final field core::int numberOfWhiskers = null;
- synthetic constructor •({required core::int numberOfLegs, required core::int numberOfWhiskers}) → self::Cat
- : self::Cat::numberOfLegs = numberOfLegs, self::Cat::numberOfWhiskers = numberOfWhiskers, super core::Object::•()
- ;
-}
-static const field core::String valueClass = #C1;
-static method main() → dynamic {
- self::Cat firstCat = invalid-expression "pkg/front_end/testcases/value_class/super_type.dart:19: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/super_type.dart:20: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/super_type.dart:21: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}));
-}
-static method expect(dynamic expected, dynamic actual, [dynamic expectNull = #C2]) → dynamic {
- if(expectNull as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
- expected = null;
- }
- if(!expected.{core::Object::==}(actual)) {
- throw "Mismatch: expected=${expected}, actual=${actual}";
- }
-}
-
-constants {
- #C1 = "valueClass"
- #C2 = false
-}
diff --git a/pkg/front_end/testcases/value_class/super_type.dart.textual_outline.expect b/pkg/front_end/testcases/value_class/super_type.dart.textual_outline.expect
deleted file mode 100644
index 027fa5d..0000000
--- a/pkg/front_end/testcases/value_class/super_type.dart.textual_outline.expect
+++ /dev/null
@@ -1,15 +0,0 @@
-const String valueClass = "valueClass";
-
-@valueClass
-class Animal {
- final int numberOfLegs;
-}
-
-@valueClass
-class Cat implements Animal {
- final int numberOfLegs;
- final int numberOfWhiskers;
-}
-
-main() {}
-expect(expected, actual, [expectNull = false]) {}
diff --git a/pkg/front_end/testcases/value_class/super_type.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/value_class/super_type.dart.textual_outline_modelled.expect
deleted file mode 100644
index 7b66670..0000000
--- a/pkg/front_end/testcases/value_class/super_type.dart.textual_outline_modelled.expect
+++ /dev/null
@@ -1,14 +0,0 @@
-@valueClass
-class Animal {
- final int numberOfLegs;
-}
-
-@valueClass
-class Cat implements Animal {
- final int numberOfLegs;
- final int numberOfWhiskers;
-}
-
-const String valueClass = "valueClass";
-expect(expected, actual, [expectNull = false]) {}
-main() {}
diff --git a/pkg/front_end/testcases/value_class/super_type.dart.weak.expect b/pkg/front_end/testcases/value_class/super_type.dart.weak.expect
deleted file mode 100644
index 63760688..0000000
--- a/pkg/front_end/testcases/value_class/super_type.dart.weak.expect
+++ /dev/null
@@ -1,85 +0,0 @@
-library /*isNonNullableByDefault*/;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/value_class/super_type.dart:19:22: Error: No named parameter with the name 'numberOfLegs'.
-// Cat firstCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
-// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/super_type.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
-// class Cat implements Animal {
-// ^
-//
-// pkg/front_end/testcases/value_class/super_type.dart:20:23: Error: No named parameter with the name 'numberOfLegs'.
-// Cat secondCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
-// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/super_type.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
-// class Cat implements Animal {
-// ^
-//
-// pkg/front_end/testcases/value_class/super_type.dart:21:22: Error: No named parameter with the name 'numberOfLegs'.
-// Cat thirdCat = Cat(numberOfLegs: 4, numberOfWhiskers: 0);
-// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/super_type.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
-// class Cat implements Animal {
-// ^
-//
-// pkg/front_end/testcases/value_class/super_type.dart:9: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/super_type.dart:14: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/super_type.dart:15:13: Error: Final field 'numberOfWhiskers' is not initialized.
-// Try to initialize the field in the declaration or in every constructor.
-// final int numberOfWhiskers;
-// ^^^^^^^^^^^^^^^^
-//
-import self as self;
-import "dart:core" as core;
-
-class Animal extends core::Object {
- final field core::int numberOfLegs = null;
- synthetic constructor •({required core::int numberOfLegs}) → self::Animal
- : self::Animal::numberOfLegs = numberOfLegs, super core::Object::•()
- ;
-}
-class Cat extends core::Object implements self::Animal {
- final field core::int numberOfLegs = null;
- final field core::int numberOfWhiskers = null;
- synthetic constructor •({required core::int numberOfLegs, required core::int numberOfWhiskers}) → self::Cat
- : self::Cat::numberOfLegs = numberOfLegs, self::Cat::numberOfWhiskers = numberOfWhiskers, super core::Object::•()
- ;
-}
-static const field core::String valueClass = #C1;
-static method main() → dynamic {
- self::Cat firstCat = invalid-expression "pkg/front_end/testcases/value_class/super_type.dart:19: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/super_type.dart:20: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/super_type.dart:21: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}));
-}
-static method expect(dynamic expected, dynamic actual, [dynamic expectNull = #C2]) → dynamic {
- if(expectNull as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
- expected = null;
- }
- if(!expected.{core::Object::==}(actual)) {
- throw "Mismatch: expected=${expected}, actual=${actual}";
- }
-}
-
-constants {
- #C1 = "valueClass"
- #C2 = false
-}
diff --git a/pkg/front_end/testcases/value_class/super_type.dart.weak.transformed.expect b/pkg/front_end/testcases/value_class/super_type.dart.weak.transformed.expect
deleted file mode 100644
index fdbcb96..0000000
--- a/pkg/front_end/testcases/value_class/super_type.dart.weak.transformed.expect
+++ /dev/null
@@ -1,85 +0,0 @@
-library /*isNonNullableByDefault*/;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/value_class/super_type.dart:19:22: Error: No named parameter with the name 'numberOfLegs'.
-// Cat firstCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
-// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/super_type.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
-// class Cat implements Animal {
-// ^
-//
-// pkg/front_end/testcases/value_class/super_type.dart:20:23: Error: No named parameter with the name 'numberOfLegs'.
-// Cat secondCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
-// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/super_type.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
-// class Cat implements Animal {
-// ^
-//
-// pkg/front_end/testcases/value_class/super_type.dart:21:22: Error: No named parameter with the name 'numberOfLegs'.
-// Cat thirdCat = Cat(numberOfLegs: 4, numberOfWhiskers: 0);
-// ^^^^^^^^^^^^
-// pkg/front_end/testcases/value_class/super_type.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
-// class Cat implements Animal {
-// ^
-//
-// pkg/front_end/testcases/value_class/super_type.dart:9: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/super_type.dart:14: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/super_type.dart:15:13: Error: Final field 'numberOfWhiskers' is not initialized.
-// Try to initialize the field in the declaration or in every constructor.
-// final int numberOfWhiskers;
-// ^^^^^^^^^^^^^^^^
-//
-import self as self;
-import "dart:core" as core;
-
-class Animal extends core::Object {
- final field core::int numberOfLegs = null;
- synthetic constructor •({required core::int numberOfLegs}) → self::Animal
- : self::Animal::numberOfLegs = numberOfLegs, super core::Object::•()
- ;
-}
-class Cat extends core::Object implements self::Animal {
- final field core::int numberOfLegs = null;
- final field core::int numberOfWhiskers = null;
- synthetic constructor •({required core::int numberOfLegs, required core::int numberOfWhiskers}) → self::Cat
- : self::Cat::numberOfLegs = numberOfLegs, self::Cat::numberOfWhiskers = numberOfWhiskers, super core::Object::•()
- ;
-}
-static const field core::String valueClass = #C1;
-static method main() → dynamic {
- self::Cat firstCat = invalid-expression "pkg/front_end/testcases/value_class/super_type.dart:19: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/super_type.dart:20: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/super_type.dart:21: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}));
-}
-static method expect(dynamic expected, dynamic actual, [dynamic expectNull = #C2]) → dynamic {
- if(expectNull as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
- expected = null;
- }
- if(!expected.{core::Object::==}(actual)) {
- throw "Mismatch: expected=${expected}, actual=${actual}";
- }
-}
-
-constants {
- #C1 = "valueClass"
- #C2 = false
-}
diff --git a/pkg/front_end/testcases/value_class/value_class_support_lib.dart b/pkg/front_end/testcases/value_class/value_class_support_lib.dart
new file mode 100644
index 0000000..322f2cb
--- /dev/null
+++ b/pkg/front_end/testcases/value_class/value_class_support_lib.dart
@@ -0,0 +1,22 @@
+// 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.
+
+// TODO(jlcontreras): this is a temp file for the valueClass experiment
+
+const valueClass = "valueClass";
+
+/// This code is from the dart.math sdk/lib/math/jenkins_smi_hash.dart
+class JenkinsSmiHash {
+ static int combine(int hash, int value) {
+ hash = 0x1fffffff & (hash + value);
+ hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
+ return hash ^ (hash >> 6);
+ }
+
+ static int finish(int hash) {
+ hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
+ hash = hash ^ (hash >> 11);
+ return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
+ }
+}
diff --git a/pkg/front_end/testcases/value_class/value_extends_non_value.dart b/pkg/front_end/testcases/value_class/value_extends_non_value.dart
index 141c492..758fcf3 100644
--- a/pkg/front_end/testcases/value_class/value_extends_non_value.dart
+++ b/pkg/front_end/testcases/value_class/value_extends_non_value.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-const String valueClass = "valueClass";
+import 'value_class_support_lib.dart';
class Animal {
final int numberOfLegs;
@@ -14,4 +14,18 @@
final int numberOfWhiskers;
}
-main() {}
\ No newline at end of file
+main() {
+ Cat firstCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
+ Cat secondCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
+ Cat thirdCat = Cat(numberOfLegs: 4, numberOfWhiskers: 0);
+
+ expect(true, firstCat == secondCat);
+ expect(false, firstCat == thirdCat);
+
+ expect(true, firstCat.hashCode == secondCat.hashCode);
+ expect(false, firstCat.hashCode == thirdCat.hashCode);
+}
+
+expect(Object? expected, Object? actual) {
+ if (expected != actual) throw 'Expected=$expected, actual=$actual';
+}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/value_class/value_extends_non_value.dart.outline.expect b/pkg/front_end/testcases/value_class/value_extends_non_value.dart.outline.expect
index f21b790e..6cdbfae 100644
--- a/pkg/front_end/testcases/value_class/value_extends_non_value.dart.outline.expect
+++ b/pkg/front_end/testcases/value_class/value_extends_non_value.dart.outline.expect
@@ -1,18 +1,36 @@
library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
+import "value_class_support_lib.dart" as val;
+
+import "org-dartlang-testcase:///value_class_support_lib.dart";
class Animal extends core::Object {
final field core::int numberOfLegs;
constructor •({required core::int numberOfLegs}) → self::Animal
;
}
-@self::valueClass
+@val::valueClass
class Cat extends self::Animal {
final field core::int numberOfWhiskers;
synthetic constructor •() → self::Cat
;
}
-static const field core::String valueClass = "valueClass";
static method main() → dynamic
;
+static method expect(core::Object? expected, core::Object? actual) → dynamic
+ ;
+
+library /*isNonNullableByDefault*/;
+import self as val;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → val::JenkinsSmiHash
+ ;
+ static method combine(core::int hash, core::int value) → core::int
+ ;
+ static method finish(core::int hash) → core::int
+ ;
+}
+static const field core::String valueClass = "valueClass";
diff --git a/pkg/front_end/testcases/value_class/value_extends_non_value.dart.strong.expect b/pkg/front_end/testcases/value_class/value_extends_non_value.dart.strong.expect
index bb987c0..d1dfe1d 100644
--- a/pkg/front_end/testcases/value_class/value_extends_non_value.dart.strong.expect
+++ b/pkg/front_end/testcases/value_class/value_extends_non_value.dart.strong.expect
@@ -2,6 +2,27 @@
//
// Problems in library:
//
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:18:22: Error: No named parameter with the name 'numberOfLegs'.
+// Cat firstCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
+// ^^^^^^^^^^^^
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// class Cat extends Animal {
+// ^
+//
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:19:23: Error: No named parameter with the name 'numberOfLegs'.
+// Cat secondCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
+// ^^^^^^^^^^^^
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// class Cat extends Animal {
+// ^
+//
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:20:22: Error: No named parameter with the name 'numberOfLegs'.
+// Cat thirdCat = Cat(numberOfLegs: 4, numberOfWhiskers: 0);
+// ^^^^^^^^^^^^
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// class Cat extends Animal {
+// ^
+//
// pkg/front_end/testcases/value_class/value_extends_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;
@@ -10,6 +31,8 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
final field core::int numberOfLegs;
constructor •({required core::int numberOfLegs = #C1}) → self::Animal
@@ -22,8 +45,46 @@
: self::Cat::numberOfWhiskers = numberOfWhiskers, super self::Animal::•(numberOfLegs)
;
}
+static method main() → dynamic {
+ self::Cat firstCat = invalid-expression "pkg/front_end/testcases/value_class/value_extends_non_value.dart:18: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_extends_non_value.dart:19: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_extends_non_value.dart:20: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}));
+}
+static method expect(core::Object? expected, core::Object? actual) → dynamic {
+ if(!expected.{core::Object::==}(actual))
+ throw "Expected=${expected}, actual=${actual}";
+}
+
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
static const field core::String valueClass = #C2;
-static method main() → dynamic {}
constants {
#C1 = null
diff --git a/pkg/front_end/testcases/value_class/value_extends_non_value.dart.strong.transformed.expect b/pkg/front_end/testcases/value_class/value_extends_non_value.dart.strong.transformed.expect
index bb987c0..0e71392 100644
--- a/pkg/front_end/testcases/value_class/value_extends_non_value.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/value_class/value_extends_non_value.dart.strong.transformed.expect
@@ -2,6 +2,27 @@
//
// Problems in library:
//
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:18:22: Error: No named parameter with the name 'numberOfLegs'.
+// Cat firstCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
+// ^^^^^^^^^^^^
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// class Cat extends Animal {
+// ^
+//
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:19:23: Error: No named parameter with the name 'numberOfLegs'.
+// Cat secondCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
+// ^^^^^^^^^^^^
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// class Cat extends Animal {
+// ^
+//
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:20:22: Error: No named parameter with the name 'numberOfLegs'.
+// Cat thirdCat = Cat(numberOfLegs: 4, numberOfWhiskers: 0);
+// ^^^^^^^^^^^^
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// class Cat extends Animal {
+// ^
+//
// pkg/front_end/testcases/value_class/value_extends_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;
@@ -10,6 +31,8 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
final field core::int numberOfLegs;
constructor •({required core::int numberOfLegs = #C1}) → self::Animal
@@ -22,8 +45,46 @@
: self::Cat::numberOfWhiskers = numberOfWhiskers, super self::Animal::•(numberOfLegs)
;
}
+static method main() → dynamic {
+ self::Cat firstCat = invalid-expression "pkg/front_end/testcases/value_class/value_extends_non_value.dart:18: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_extends_non_value.dart:19: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_extends_non_value.dart:20: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}));
+}
+static method expect(core::Object? expected, core::Object? actual) → dynamic {
+ if(!expected.{core::Object::==}(actual))
+ throw "Expected=${expected}, actual=${actual}";
+}
+
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
static const field core::String valueClass = #C2;
-static method main() → dynamic {}
constants {
#C1 = null
diff --git a/pkg/front_end/testcases/value_class/value_extends_non_value.dart.textual_outline.expect b/pkg/front_end/testcases/value_class/value_extends_non_value.dart.textual_outline.expect
index 2f604a3..08a6e9d 100644
--- a/pkg/front_end/testcases/value_class/value_extends_non_value.dart.textual_outline.expect
+++ b/pkg/front_end/testcases/value_class/value_extends_non_value.dart.textual_outline.expect
@@ -1,4 +1,4 @@
-const String valueClass = "valueClass";
+import 'value_class_support_lib.dart';
class Animal {
final int numberOfLegs;
@@ -11,3 +11,4 @@
}
main() {}
+expect(Object? expected, Object? actual) {}
diff --git a/pkg/front_end/testcases/value_class/value_extends_non_value.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/value_class/value_extends_non_value.dart.textual_outline_modelled.expect
index 777086a..c071f66 100644
--- a/pkg/front_end/testcases/value_class/value_extends_non_value.dart.textual_outline_modelled.expect
+++ b/pkg/front_end/testcases/value_class/value_extends_non_value.dart.textual_outline_modelled.expect
@@ -1,3 +1,5 @@
+import 'value_class_support_lib.dart';
+
class Animal {
Animal({required this.numberOfLegs});
final int numberOfLegs;
@@ -8,5 +10,5 @@
final int numberOfWhiskers;
}
-const String valueClass = "valueClass";
+expect(Object? expected, Object? actual) {}
main() {}
diff --git a/pkg/front_end/testcases/value_class/value_extends_non_value.dart.weak.expect b/pkg/front_end/testcases/value_class/value_extends_non_value.dart.weak.expect
index bb987c0..d1dfe1d 100644
--- a/pkg/front_end/testcases/value_class/value_extends_non_value.dart.weak.expect
+++ b/pkg/front_end/testcases/value_class/value_extends_non_value.dart.weak.expect
@@ -2,6 +2,27 @@
//
// Problems in library:
//
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:18:22: Error: No named parameter with the name 'numberOfLegs'.
+// Cat firstCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
+// ^^^^^^^^^^^^
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// class Cat extends Animal {
+// ^
+//
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:19:23: Error: No named parameter with the name 'numberOfLegs'.
+// Cat secondCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
+// ^^^^^^^^^^^^
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// class Cat extends Animal {
+// ^
+//
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:20:22: Error: No named parameter with the name 'numberOfLegs'.
+// Cat thirdCat = Cat(numberOfLegs: 4, numberOfWhiskers: 0);
+// ^^^^^^^^^^^^
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// class Cat extends Animal {
+// ^
+//
// pkg/front_end/testcases/value_class/value_extends_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;
@@ -10,6 +31,8 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
final field core::int numberOfLegs;
constructor •({required core::int numberOfLegs = #C1}) → self::Animal
@@ -22,8 +45,46 @@
: self::Cat::numberOfWhiskers = numberOfWhiskers, super self::Animal::•(numberOfLegs)
;
}
+static method main() → dynamic {
+ self::Cat firstCat = invalid-expression "pkg/front_end/testcases/value_class/value_extends_non_value.dart:18: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_extends_non_value.dart:19: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_extends_non_value.dart:20: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}));
+}
+static method expect(core::Object? expected, core::Object? actual) → dynamic {
+ if(!expected.{core::Object::==}(actual))
+ throw "Expected=${expected}, actual=${actual}";
+}
+
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
static const field core::String valueClass = #C2;
-static method main() → dynamic {}
constants {
#C1 = null
diff --git a/pkg/front_end/testcases/value_class/value_extends_non_value.dart.weak.transformed.expect b/pkg/front_end/testcases/value_class/value_extends_non_value.dart.weak.transformed.expect
index bb987c0..0e71392 100644
--- a/pkg/front_end/testcases/value_class/value_extends_non_value.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/value_class/value_extends_non_value.dart.weak.transformed.expect
@@ -2,6 +2,27 @@
//
// Problems in library:
//
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:18:22: Error: No named parameter with the name 'numberOfLegs'.
+// Cat firstCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
+// ^^^^^^^^^^^^
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// class Cat extends Animal {
+// ^
+//
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:19:23: Error: No named parameter with the name 'numberOfLegs'.
+// Cat secondCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
+// ^^^^^^^^^^^^
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// class Cat extends Animal {
+// ^
+//
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:20:22: Error: No named parameter with the name 'numberOfLegs'.
+// Cat thirdCat = Cat(numberOfLegs: 4, numberOfWhiskers: 0);
+// ^^^^^^^^^^^^
+// pkg/front_end/testcases/value_class/value_extends_non_value.dart:13:7: Context: The class 'Cat' has a constructor that takes no arguments.
+// class Cat extends Animal {
+// ^
+//
// pkg/front_end/testcases/value_class/value_extends_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;
@@ -10,6 +31,8 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
final field core::int numberOfLegs;
constructor •({required core::int numberOfLegs = #C1}) → self::Animal
@@ -22,8 +45,46 @@
: self::Cat::numberOfWhiskers = numberOfWhiskers, super self::Animal::•(numberOfLegs)
;
}
+static method main() → dynamic {
+ self::Cat firstCat = invalid-expression "pkg/front_end/testcases/value_class/value_extends_non_value.dart:18: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_extends_non_value.dart:19: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_extends_non_value.dart:20: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}));
+}
+static method expect(core::Object? expected, core::Object? actual) → dynamic {
+ if(!expected.{core::Object::==}(actual))
+ throw "Expected=${expected}, actual=${actual}";
+}
+
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
static const field core::String valueClass = #C2;
-static method main() → dynamic {}
constants {
#C1 = null
diff --git a/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart b/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart
index 2f58313..f0c826e 100644
--- a/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart
+++ b/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-const String valueClass = "valueClass";
+import 'value_class_support_lib.dart';
class Animal {
int numberOfLegs;
@@ -11,4 +11,11 @@
@valueClass
class Cat extends Animal {}
+class Animal2 {
+ final int numberOfLegs;
+}
+
+@valueClass
+class Cat2 extends Animal2 {}
+
main() {}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.outline.expect b/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.outline.expect
index 05499cb..a6a74a9 100644
--- a/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.outline.expect
+++ b/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.outline.expect
@@ -1,17 +1,43 @@
library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
+import "value_class_support_lib.dart" as val;
+
+import "org-dartlang-testcase:///value_class_support_lib.dart";
class Animal extends core::Object {
field core::int numberOfLegs;
synthetic constructor •() → self::Animal
;
}
-@self::valueClass
+@val::valueClass
class Cat extends self::Animal {
synthetic constructor •() → self::Cat
;
}
-static const field core::String valueClass = "valueClass";
+class Animal2 extends core::Object {
+ final field core::int numberOfLegs;
+ synthetic constructor •() → self::Animal2
+ ;
+}
+@val::valueClass
+class Cat2 extends self::Animal2 {
+ synthetic constructor •() → self::Cat2
+ ;
+}
static method main() → dynamic
;
+
+library /*isNonNullableByDefault*/;
+import self as val;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → val::JenkinsSmiHash
+ ;
+ static method combine(core::int hash, core::int value) → core::int
+ ;
+ static method finish(core::int hash) → core::int
+ ;
+}
+static const field core::String valueClass = "valueClass";
diff --git a/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.strong.expect b/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.strong.expect
index 9c469b8..48ba960 100644
--- a/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.strong.expect
+++ b/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.strong.expect
@@ -6,9 +6,16 @@
// int numberOfLegs;
// ^^^^^^^^^^^^
//
+// pkg/front_end/testcases/value_class/value_extends_non_value_error.dart:15:13: Error: Final field 'numberOfLegs' is not initialized.
+// Try to initialize the field in the declaration or in every constructor.
+// final int numberOfLegs;
+// ^^^^^^^^^^^^
+//
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
field core::int numberOfLegs = null;
synthetic constructor •() → self::Animal
@@ -20,9 +27,40 @@
: super self::Animal::•()
;
}
-static const field core::String valueClass = #C1;
+class Animal2 extends core::Object {
+ final field core::int numberOfLegs = null;
+ synthetic constructor •() → self::Animal2
+ : super core::Object::•()
+ ;
+}
+class Cat2 extends self::Animal2 {
+ synthetic constructor •() → self::Cat2
+ : super self::Animal2::•()
+ ;
+}
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.strong.transformed.expect b/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.strong.transformed.expect
index 9c469b8..48ba960 100644
--- a/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.strong.transformed.expect
@@ -6,9 +6,16 @@
// int numberOfLegs;
// ^^^^^^^^^^^^
//
+// pkg/front_end/testcases/value_class/value_extends_non_value_error.dart:15:13: Error: Final field 'numberOfLegs' is not initialized.
+// Try to initialize the field in the declaration or in every constructor.
+// final int numberOfLegs;
+// ^^^^^^^^^^^^
+//
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
field core::int numberOfLegs = null;
synthetic constructor •() → self::Animal
@@ -20,9 +27,40 @@
: super self::Animal::•()
;
}
-static const field core::String valueClass = #C1;
+class Animal2 extends core::Object {
+ final field core::int numberOfLegs = null;
+ synthetic constructor •() → self::Animal2
+ : super core::Object::•()
+ ;
+}
+class Cat2 extends self::Animal2 {
+ synthetic constructor •() → self::Cat2
+ : super self::Animal2::•()
+ ;
+}
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.textual_outline.expect b/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.textual_outline.expect
index a670dab..d2bd8a2 100644
--- a/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.textual_outline.expect
+++ b/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.textual_outline.expect
@@ -1,4 +1,4 @@
-const String valueClass = "valueClass";
+import 'value_class_support_lib.dart';
class Animal {
int numberOfLegs;
@@ -7,4 +7,11 @@
@valueClass
class Cat extends Animal {}
+class Animal2 {
+ final int numberOfLegs;
+}
+
+@valueClass
+class Cat2 extends Animal2 {}
+
main() {}
diff --git a/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.textual_outline_modelled.expect
index d4c74c2..f9e6e36 100644
--- a/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.textual_outline_modelled.expect
+++ b/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.textual_outline_modelled.expect
@@ -1,9 +1,17 @@
+import 'value_class_support_lib.dart';
+
class Animal {
int numberOfLegs;
}
+class Animal2 {
+ final int numberOfLegs;
+}
+
@valueClass
class Cat extends Animal {}
-const String valueClass = "valueClass";
+@valueClass
+class Cat2 extends Animal2 {}
+
main() {}
diff --git a/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.weak.expect b/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.weak.expect
index 9c469b8..48ba960 100644
--- a/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.weak.expect
+++ b/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.weak.expect
@@ -6,9 +6,16 @@
// int numberOfLegs;
// ^^^^^^^^^^^^
//
+// pkg/front_end/testcases/value_class/value_extends_non_value_error.dart:15:13: Error: Final field 'numberOfLegs' is not initialized.
+// Try to initialize the field in the declaration or in every constructor.
+// final int numberOfLegs;
+// ^^^^^^^^^^^^
+//
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
field core::int numberOfLegs = null;
synthetic constructor •() → self::Animal
@@ -20,9 +27,40 @@
: super self::Animal::•()
;
}
-static const field core::String valueClass = #C1;
+class Animal2 extends core::Object {
+ final field core::int numberOfLegs = null;
+ synthetic constructor •() → self::Animal2
+ : super core::Object::•()
+ ;
+}
+class Cat2 extends self::Animal2 {
+ synthetic constructor •() → self::Cat2
+ : super self::Animal2::•()
+ ;
+}
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.weak.transformed.expect b/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.weak.transformed.expect
index 9c469b8..48ba960 100644
--- a/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/value_class/value_extends_non_value_error.dart.weak.transformed.expect
@@ -6,9 +6,16 @@
// int numberOfLegs;
// ^^^^^^^^^^^^
//
+// pkg/front_end/testcases/value_class/value_extends_non_value_error.dart:15:13: Error: Final field 'numberOfLegs' is not initialized.
+// Try to initialize the field in the declaration or in every constructor.
+// final int numberOfLegs;
+// ^^^^^^^^^^^^
+//
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class Animal extends core::Object {
field core::int numberOfLegs = null;
synthetic constructor •() → self::Animal
@@ -20,9 +27,40 @@
: super self::Animal::•()
;
}
-static const field core::String valueClass = #C1;
+class Animal2 extends core::Object {
+ final field core::int numberOfLegs = null;
+ synthetic constructor •() → self::Animal2
+ : super core::Object::•()
+ ;
+}
+class Cat2 extends self::Animal2 {
+ synthetic constructor •() → self::Cat2
+ : super self::Animal2::•()
+ ;
+}
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
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 e75c70d..ccb27e8 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,8 @@
// 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.
-const String valueClass = "valueClass";
+import '../nnbd_mixed/nnbd_opt_out_language_version.dart';
+import 'value_class_support_lib.dart';
class Animal {
final int numberOfLegs;
@@ -11,6 +12,42 @@
@valueClass
class Cat implements Animal {
final int numberOfLegs;
+ final int numberOfWhiskers;
}
-main() {}
\ No newline at end of file
+abstract class Animal2 {
+ int get numberOfLegs;
+}
+
+@valueClass
+class Cat2 implements Animal2 {
+ final int numberOfLegs;
+ final int numberOfWhiskers;
+}
+
+
+main() {
+ Cat firstCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
+ Cat secondCat = Cat(numberOfLegs: 4, numberOfWhiskers: 10);
+ Cat thirdCat = Cat(numberOfLegs: 4, numberOfWhiskers: 0);
+
+ expect(true, firstCat == secondCat);
+ expect(false, firstCat == thirdCat);
+
+ expect(true, firstCat.hashCode == secondCat.hashCode);
+ expect(false, firstCat.hashCode == thirdCat.hashCode);
+
+ Cat2 firstCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 10);
+ Cat2 secondCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 10);
+ Cat2 thirdCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 0);
+
+ expect(true, firstCat2 == secondCat2);
+ expect(false, firstCat2 == thirdCat2);
+
+ expect(true, firstCat2.hashCode == secondCat2.hashCode);
+ expect(false, firstCat2.hashCode == thirdCat2.hashCode);
+}
+
+expect(Object? expected, Object? actual) {
+ if (expected != actual) throw 'Expected=$expected, actual=$actual';
+}
\ No newline at end of file
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 ed5f98c..858458c 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
@@ -1,18 +1,82 @@
library /*isNonNullableByDefault*/;
import self as self;
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 {
final field core::int numberOfLegs;
synthetic constructor •() → self::Animal
;
}
-@self::valueClass
+@val::valueClass
class Cat extends core::Object implements self::Animal {
final field core::int numberOfLegs;
+ final field core::int numberOfWhiskers;
synthetic constructor •() → self::Cat
;
}
-static const field core::String valueClass = "valueClass";
+abstract class Animal2 extends core::Object {
+ synthetic constructor •() → self::Animal2
+ ;
+ abstract get numberOfLegs() → core::int;
+}
+@val::valueClass
+class Cat2 extends core::Object implements self::Animal2 {
+ final field core::int numberOfLegs;
+ final field core::int numberOfWhiskers;
+ synthetic constructor •() → self::Cat2
+ ;
+}
static method main() → dynamic
;
+static method expect(core::Object? expected, core::Object? actual) → dynamic
+ ;
+
+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;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → val::JenkinsSmiHash
+ ;
+ static method combine(core::int hash, core::int value) → core::int
+ ;
+ static method finish(core::int hash) → core::int
+ ;
+}
+static const field core::String valueClass = "valueClass";
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 9b0e0a3..9673b1e 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,19 +2,79 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:8:13: Error: Final field 'numberOfLegs' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:30: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.
+// 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'.
+// 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.
+// 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'.
+// 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.
+// 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'.
+// 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.
+// 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'.
+// 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.
+// 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'.
+// 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.
+// class Cat2 implements Animal2 {
+// ^
+//
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:9: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:13:13: Error: Final field 'numberOfLegs' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:14: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.
+// 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.
+// 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.
+// Try to initialize the field in the declaration or in every constructor.
+// final int numberOfWhiskers;
+// ^^^^^^^^^^^^^^^^
+//
import self as self;
import "dart:core" as core;
+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 {
final field core::int numberOfLegs = null;
synthetic constructor •() → self::Animal
@@ -23,12 +83,139 @@
}
class Cat extends core::Object implements self::Animal {
final field core::int numberOfLegs = null;
- synthetic constructor •({required core::int numberOfLegs}) → self::Cat
- : self::Cat::numberOfLegs = numberOfLegs, super core::Object::•()
+ final field core::int numberOfWhiskers = null;
+ synthetic constructor •({required core::int numberOfLegs, required core::int numberOfWhiskers}) → self::Cat
+ : self::Cat::numberOfLegs = numberOfLegs, self::Cat::numberOfWhiskers = numberOfWhiskers, super core::Object::•()
;
}
+abstract class Animal2 extends core::Object {
+ synthetic constructor •() → self::Animal2
+ : super core::Object::•()
+ ;
+ abstract get numberOfLegs() → core::int;
+}
+class Cat2 extends core::Object implements self::Animal2 {
+ final field core::int numberOfLegs = null;
+ final field core::int numberOfWhiskers = null;
+ synthetic constructor •({required core::int numberOfLegs, required core::int numberOfWhiskers}) → self::Cat2
+ : self::Cat2::numberOfLegs = numberOfLegs, self::Cat2::numberOfWhiskers = numberOfWhiskers, super core::Object::•()
+ ;
+}
+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'.
+ 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'.
+ 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'.
+ 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'.
+ 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'.
+ 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'.
+ Cat2 thirdCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 0);
+ ^^^^^^^^^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} self::Cat2;
+ self::expect(true, firstCat2.{core::Object::==}(secondCat2));
+ self::expect(false, firstCat2.{core::Object::==}(thirdCat2));
+ self::expect(true, firstCat2.{core::Object::hashCode}.{core::num::==}(secondCat2.{core::Object::hashCode}));
+ self::expect(false, firstCat2.{core::Object::hashCode}.{core::num::==}(thirdCat2.{core::Object::hashCode}));
+}
+static method expect(core::Object? expected, core::Object? actual) → dynamic {
+ if(!expected.{core::Object::==}(actual))
+ throw "Expected=${expected}, actual=${actual}";
+}
+
+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 self3;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self3::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
static const field core::String valueClass = #C1;
-static method main() → dynamic {}
constants {
#C1 = "valueClass"
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 9b0e0a3..bc62310 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,19 +2,79 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:8:13: Error: Final field 'numberOfLegs' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:30: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.
+// 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'.
+// 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.
+// 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'.
+// 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.
+// 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'.
+// 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.
+// 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'.
+// 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.
+// 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'.
+// 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.
+// class Cat2 implements Animal2 {
+// ^
+//
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:9: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:13:13: Error: Final field 'numberOfLegs' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:14: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.
+// 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.
+// 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.
+// Try to initialize the field in the declaration or in every constructor.
+// final int numberOfWhiskers;
+// ^^^^^^^^^^^^^^^^
+//
import self as self;
import "dart:core" as core;
+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 {
final field core::int numberOfLegs = null;
synthetic constructor •() → self::Animal
@@ -23,12 +83,139 @@
}
class Cat extends core::Object implements self::Animal {
final field core::int numberOfLegs = null;
- synthetic constructor •({required core::int numberOfLegs}) → self::Cat
- : self::Cat::numberOfLegs = numberOfLegs, super core::Object::•()
+ final field core::int numberOfWhiskers = null;
+ synthetic constructor •({required core::int numberOfLegs, required core::int numberOfWhiskers}) → self::Cat
+ : self::Cat::numberOfLegs = numberOfLegs, self::Cat::numberOfWhiskers = numberOfWhiskers, super core::Object::•()
;
}
+abstract class Animal2 extends core::Object {
+ synthetic constructor •() → self::Animal2
+ : super core::Object::•()
+ ;
+ abstract get numberOfLegs() → core::int;
+}
+class Cat2 extends core::Object implements self::Animal2 {
+ final field core::int numberOfLegs = null;
+ final field core::int numberOfWhiskers = null;
+ synthetic constructor •({required core::int numberOfLegs, required core::int numberOfWhiskers}) → self::Cat2
+ : self::Cat2::numberOfLegs = numberOfLegs, self::Cat2::numberOfWhiskers = numberOfWhiskers, super core::Object::•()
+ ;
+}
+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'.
+ 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'.
+ 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'.
+ 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'.
+ 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'.
+ 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'.
+ Cat2 thirdCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 0);
+ ^^^^^^^^^^^^";
+ self::expect(true, firstCat2.{core::Object::==}(secondCat2));
+ self::expect(false, firstCat2.{core::Object::==}(thirdCat2));
+ self::expect(true, firstCat2.{core::Object::hashCode}.{core::num::==}(secondCat2.{core::Object::hashCode}));
+ self::expect(false, firstCat2.{core::Object::hashCode}.{core::num::==}(thirdCat2.{core::Object::hashCode}));
+}
+static method expect(core::Object? expected, core::Object? actual) → dynamic {
+ if(!expected.{core::Object::==}(actual))
+ throw "Expected=${expected}, actual=${actual}";
+}
+
+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 self3;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self3::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
static const field core::String valueClass = #C1;
-static method main() → dynamic {}
constants {
#C1 = "valueClass"
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 193bb7e..2d8e9d2 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,5 @@
-const String valueClass = "valueClass";
+import '../nnbd_mixed/nnbd_opt_out_language_version.dart';
+import 'value_class_support_lib.dart';
class Animal {
final int numberOfLegs;
@@ -7,6 +8,18 @@
@valueClass
class Cat implements Animal {
final int numberOfLegs;
+ final int numberOfWhiskers;
+}
+
+abstract class Animal2 {
+ int get numberOfLegs;
+}
+
+@valueClass
+class Cat2 implements Animal2 {
+ final int numberOfLegs;
+ final int numberOfWhiskers;
}
main() {}
+expect(Object? expected, Object? actual) {}
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 c6763aa..43b3505 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,3 +1,10 @@
+import '../nnbd_mixed/nnbd_opt_out_language_version.dart';
+import 'value_class_support_lib.dart';
+
+abstract class Animal2 {
+ int get numberOfLegs;
+}
+
class Animal {
final int numberOfLegs;
}
@@ -5,7 +12,14 @@
@valueClass
class Cat implements Animal {
final int numberOfLegs;
+ final int numberOfWhiskers;
}
-const String valueClass = "valueClass";
+@valueClass
+class Cat2 implements Animal2 {
+ final int numberOfLegs;
+ final int numberOfWhiskers;
+}
+
+expect(Object? expected, Object? actual) {}
main() {}
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 9b0e0a3..b0891a3 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,19 +2,79 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:8:13: Error: Final field 'numberOfLegs' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:30: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.
+// 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'.
+// 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.
+// 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'.
+// 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.
+// 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'.
+// 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.
+// 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'.
+// 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.
+// 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'.
+// 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.
+// class Cat2 implements Animal2 {
+// ^
+//
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:9: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:13:13: Error: Final field 'numberOfLegs' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:14: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.
+// 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.
+// 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.
+// Try to initialize the field in the declaration or in every constructor.
+// final int numberOfWhiskers;
+// ^^^^^^^^^^^^^^^^
+//
import self as self;
import "dart:core" as core;
+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 {
final field core::int numberOfLegs = null;
synthetic constructor •() → self::Animal
@@ -23,12 +83,139 @@
}
class Cat extends core::Object implements self::Animal {
final field core::int numberOfLegs = null;
- synthetic constructor •({required core::int numberOfLegs}) → self::Cat
- : self::Cat::numberOfLegs = numberOfLegs, super core::Object::•()
+ final field core::int numberOfWhiskers = null;
+ synthetic constructor •({required core::int numberOfLegs, required core::int numberOfWhiskers}) → self::Cat
+ : self::Cat::numberOfLegs = numberOfLegs, self::Cat::numberOfWhiskers = numberOfWhiskers, super core::Object::•()
;
}
+abstract class Animal2 extends core::Object {
+ synthetic constructor •() → self::Animal2
+ : super core::Object::•()
+ ;
+ abstract get numberOfLegs() → core::int;
+}
+class Cat2 extends core::Object implements self::Animal2 {
+ final field core::int numberOfLegs = null;
+ final field core::int numberOfWhiskers = null;
+ synthetic constructor •({required core::int numberOfLegs, required core::int numberOfWhiskers}) → self::Cat2
+ : self::Cat2::numberOfLegs = numberOfLegs, self::Cat2::numberOfWhiskers = numberOfWhiskers, super core::Object::•()
+ ;
+}
+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'.
+ 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'.
+ 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'.
+ 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'.
+ 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'.
+ 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'.
+ Cat2 thirdCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 0);
+ ^^^^^^^^^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} self::Cat2;
+ self::expect(true, firstCat2.{core::Object::==}(secondCat2));
+ self::expect(false, firstCat2.{core::Object::==}(thirdCat2));
+ self::expect(true, firstCat2.{core::Object::hashCode}.{core::num::==}(secondCat2.{core::Object::hashCode}));
+ self::expect(false, firstCat2.{core::Object::hashCode}.{core::num::==}(thirdCat2.{core::Object::hashCode}));
+}
+static method expect(core::Object? expected, core::Object? actual) → dynamic {
+ if(!expected.{core::Object::==}(actual))
+ 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 self3;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self3::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
static const field core::String valueClass = #C1;
-static method main() → dynamic {}
constants {
#C1 = "valueClass"
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 9b0e0a3..91e0d37 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,19 +2,79 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/value_class/value_implements_non_value.dart:8:13: Error: Final field 'numberOfLegs' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:30: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.
+// 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'.
+// 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.
+// 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'.
+// 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.
+// 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'.
+// 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.
+// 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'.
+// 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.
+// 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'.
+// 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.
+// class Cat2 implements Animal2 {
+// ^
+//
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:9: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:13:13: Error: Final field 'numberOfLegs' is not initialized.
+// pkg/front_end/testcases/value_class/value_implements_non_value.dart:14: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.
+// 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.
+// 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.
+// Try to initialize the field in the declaration or in every constructor.
+// final int numberOfWhiskers;
+// ^^^^^^^^^^^^^^^^
+//
import self as self;
import "dart:core" as core;
+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 {
final field core::int numberOfLegs = null;
synthetic constructor •() → self::Animal
@@ -23,12 +83,139 @@
}
class Cat extends core::Object implements self::Animal {
final field core::int numberOfLegs = null;
- synthetic constructor •({required core::int numberOfLegs}) → self::Cat
- : self::Cat::numberOfLegs = numberOfLegs, super core::Object::•()
+ final field core::int numberOfWhiskers = null;
+ synthetic constructor •({required core::int numberOfLegs, required core::int numberOfWhiskers}) → self::Cat
+ : self::Cat::numberOfLegs = numberOfLegs, self::Cat::numberOfWhiskers = numberOfWhiskers, super core::Object::•()
;
}
+abstract class Animal2 extends core::Object {
+ synthetic constructor •() → self::Animal2
+ : super core::Object::•()
+ ;
+ abstract get numberOfLegs() → core::int;
+}
+class Cat2 extends core::Object implements self::Animal2 {
+ final field core::int numberOfLegs = null;
+ final field core::int numberOfWhiskers = null;
+ synthetic constructor •({required core::int numberOfLegs, required core::int numberOfWhiskers}) → self::Cat2
+ : self::Cat2::numberOfLegs = numberOfLegs, self::Cat2::numberOfWhiskers = numberOfWhiskers, super core::Object::•()
+ ;
+}
+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'.
+ 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'.
+ 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'.
+ 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'.
+ 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'.
+ 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'.
+ Cat2 thirdCat2 = Cat2(numberOfLegs: 4, numberOfWhiskers: 0);
+ ^^^^^^^^^^^^";
+ self::expect(true, firstCat2.{core::Object::==}(secondCat2));
+ self::expect(false, firstCat2.{core::Object::==}(thirdCat2));
+ self::expect(true, firstCat2.{core::Object::hashCode}.{core::num::==}(secondCat2.{core::Object::hashCode}));
+ self::expect(false, firstCat2.{core::Object::hashCode}.{core::num::==}(thirdCat2.{core::Object::hashCode}));
+}
+static method expect(core::Object? expected, core::Object? actual) → dynamic {
+ if(!expected.{core::Object::==}(actual))
+ 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 self3;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self3::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
static const field core::String valueClass = #C1;
-static method main() → dynamic {}
constants {
#C1 = "valueClass"
diff --git a/pkg/front_end/testcases/value_class/value_mixin_error.dart b/pkg/front_end/testcases/value_class/value_mixin_error.dart
index 3cf32a7..a6bfe09 100644
--- a/pkg/front_end/testcases/value_class/value_mixin_error.dart
+++ b/pkg/front_end/testcases/value_class/value_mixin_error.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-const String valueClass = "valueClass";
+import 'value_class_support_lib.dart';
@valueClass
class A {}
diff --git a/pkg/front_end/testcases/value_class/value_mixin_error.dart.outline.expect b/pkg/front_end/testcases/value_class/value_mixin_error.dart.outline.expect
index 4ccaf3a..3210673 100644
--- a/pkg/front_end/testcases/value_class/value_mixin_error.dart.outline.expect
+++ b/pkg/front_end/testcases/value_class/value_mixin_error.dart.outline.expect
@@ -1,8 +1,11 @@
library /*isNonNullableByDefault*/;
import self as self;
+import "value_class_support_lib.dart" as val;
import "dart:core" as core;
-@self::valueClass
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
+@val::valueClass
class A extends core::Object {
synthetic constructor •() → self::A
;
@@ -29,6 +32,19 @@
synthetic constructor •() → self::D
;
}
-static const field core::String valueClass = "valueClass";
static method main() → dynamic
;
+
+library /*isNonNullableByDefault*/;
+import self as val;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → val::JenkinsSmiHash
+ ;
+ static method combine(core::int hash, core::int value) → core::int
+ ;
+ static method finish(core::int hash) → core::int
+ ;
+}
+static const field core::String valueClass = "valueClass";
diff --git a/pkg/front_end/testcases/value_class/value_mixin_error.dart.strong.expect b/pkg/front_end/testcases/value_class/value_mixin_error.dart.strong.expect
index cc2aea2..a99cf80 100644
--- a/pkg/front_end/testcases/value_class/value_mixin_error.dart.strong.expect
+++ b/pkg/front_end/testcases/value_class/value_mixin_error.dart.strong.expect
@@ -2,6 +2,8 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class A extends core::Object {
synthetic constructor •() → self::A
: super core::Object::•()
@@ -32,9 +34,29 @@
: super self::_D&A&B::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/value_mixin_error.dart.strong.transformed.expect b/pkg/front_end/testcases/value_class/value_mixin_error.dart.strong.transformed.expect
index 5382fce..6c90e1e 100644
--- a/pkg/front_end/testcases/value_class/value_mixin_error.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/value_class/value_mixin_error.dart.strong.transformed.expect
@@ -2,6 +2,8 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class A extends core::Object {
synthetic constructor •() → self::A
: super core::Object::•()
@@ -32,9 +34,29 @@
: super self::_D&A&B::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/value_mixin_error.dart.textual_outline.expect b/pkg/front_end/testcases/value_class/value_mixin_error.dart.textual_outline.expect
index 811ccf9..0e31c97 100644
--- a/pkg/front_end/testcases/value_class/value_mixin_error.dart.textual_outline.expect
+++ b/pkg/front_end/testcases/value_class/value_mixin_error.dart.textual_outline.expect
@@ -1,4 +1,4 @@
-const String valueClass = "valueClass";
+import 'value_class_support_lib.dart';
@valueClass
class A {}
diff --git a/pkg/front_end/testcases/value_class/value_mixin_error.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/value_class/value_mixin_error.dart.textual_outline_modelled.expect
index f9ac261..0e31c97 100644
--- a/pkg/front_end/testcases/value_class/value_mixin_error.dart.textual_outline_modelled.expect
+++ b/pkg/front_end/testcases/value_class/value_mixin_error.dart.textual_outline_modelled.expect
@@ -1,3 +1,5 @@
+import 'value_class_support_lib.dart';
+
@valueClass
class A {}
@@ -7,5 +9,4 @@
class D extends A with B {}
-const String valueClass = "valueClass";
main() {}
diff --git a/pkg/front_end/testcases/value_class/value_mixin_error.dart.weak.expect b/pkg/front_end/testcases/value_class/value_mixin_error.dart.weak.expect
index cc2aea2..a99cf80 100644
--- a/pkg/front_end/testcases/value_class/value_mixin_error.dart.weak.expect
+++ b/pkg/front_end/testcases/value_class/value_mixin_error.dart.weak.expect
@@ -2,6 +2,8 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class A extends core::Object {
synthetic constructor •() → self::A
: super core::Object::•()
@@ -32,9 +34,29 @@
: super self::_D&A&B::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/value_class/value_mixin_error.dart.weak.transformed.expect b/pkg/front_end/testcases/value_class/value_mixin_error.dart.weak.transformed.expect
index 5382fce..6c90e1e 100644
--- a/pkg/front_end/testcases/value_class/value_mixin_error.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/value_class/value_mixin_error.dart.weak.transformed.expect
@@ -2,6 +2,8 @@
import self as self;
import "dart:core" as core;
+import "org-dartlang-testcase:///value_class_support_lib.dart";
+
class A extends core::Object {
synthetic constructor •() → self::A
: super core::Object::•()
@@ -32,9 +34,29 @@
: super self::_D&A&B::•()
;
}
-static const field core::String valueClass = #C1;
static method main() → dynamic {}
+library /*isNonNullableByDefault*/;
+import self as self2;
+import "dart:core" as core;
+
+class JenkinsSmiHash extends core::Object {
+ synthetic constructor •() → self2::JenkinsSmiHash
+ : super core::Object::•()
+ ;
+ static method combine(core::int hash, core::int value) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(value));
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash).{core::int::<<}(10)));
+ return hash.{core::int::^}(hash.{core::int::>>}(6));
+ }
+ static method finish(core::int hash) → core::int {
+ hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash).{core::int::<<}(3)));
+ hash = hash.{core::int::^}(hash.{core::int::>>}(11));
+ return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash).{core::int::<<}(15)));
+ }
+}
+static const field core::String valueClass = #C1;
+
constants {
#C1 = "valueClass"
}
diff --git a/pkg/front_end/testcases/weak.status b/pkg/front_end/testcases/weak.status
index 8df9de3..d9272d6 100644
--- a/pkg/front_end/testcases/weak.status
+++ b/pkg/front_end/testcases/weak.status
@@ -73,5 +73,5 @@
nnbd_mixed/messages_with_types_opt_out: TypeCheckError
nnbd_mixed/never_opt_out: TypeCheckError
value_class/simple: RuntimeError # Expected
-value_class/super_type: RuntimeError # Expected
-
+value_class/value_extends_non_value: RuntimeError # Expected
+value_class/value_implements_non_value: RuntimeError # Expected
\ No newline at end of file
diff --git a/runtime/vm/compiler/backend/il.cc b/runtime/vm/compiler/backend/il.cc
index 85abf0f..aa5891d 100644
--- a/runtime/vm/compiler/backend/il.cc
+++ b/runtime/vm/compiler/backend/il.cc
@@ -2687,6 +2687,7 @@
case Slot::Kind::kArray_length:
case Slot::Kind::kTypedDataBase_length:
case Slot::Kind::kString_length:
+ case Slot::Kind::kTypeArguments_length:
return true;
case Slot::Kind::kGrowableObjectArray_length:
return false;
@@ -2793,6 +2794,42 @@
}
return false;
+ case Slot::Kind::kArgumentsDescriptor_count:
+ if (instance.IsArray() && Array::Cast(instance).IsImmutable()) {
+ ArgumentsDescriptor desc(Array::Cast(instance));
+ *result = Smi::New(desc.Count());
+ return true;
+ }
+ return false;
+
+ case Slot::Kind::kArgumentsDescriptor_positional_count:
+ if (instance.IsArray() && Array::Cast(instance).IsImmutable()) {
+ ArgumentsDescriptor desc(Array::Cast(instance));
+ *result = Smi::New(desc.PositionalCount());
+ return true;
+ }
+ return false;
+
+ case Slot::Kind::kArgumentsDescriptor_size:
+ // If a constant arguments descriptor appears, then either it is from
+ // a invocation dispatcher (which always has tagged arguments and so
+ // [host]Size() == [target]Size() == Count()) or the constant should
+ // have the correct Size() in terms of the target architecture if any
+ // spill slots are involved.
+ if (instance.IsArray() && Array::Cast(instance).IsImmutable()) {
+ ArgumentsDescriptor desc(Array::Cast(instance));
+ *result = Smi::New(desc.Size());
+ return true;
+ }
+ return false;
+
+ case Slot::Kind::kTypeArguments_length:
+ if (instance.IsTypeArguments()) {
+ *result = Smi::New(TypeArguments::Cast(instance).Length());
+ return true;
+ }
+ return false;
+
default:
break;
}
diff --git a/runtime/vm/compiler/backend/range_analysis.cc b/runtime/vm/compiler/backend/range_analysis.cc
index 65d99f1..029dd94 100644
--- a/runtime/vm/compiler/backend/range_analysis.cc
+++ b/runtime/vm/compiler/backend/range_analysis.cc
@@ -2689,6 +2689,7 @@
RangeBoundary::FromConstant(compiler::target::Array::kMaxElements));
break;
+ case Slot::Kind::kTypeArguments_length:
case Slot::Kind::kTypedDataBase_length:
case Slot::Kind::kTypedDataView_offset_in_bytes:
*range = Range(RangeBoundary::FromConstant(0), RangeBoundary::MaxSmi());
diff --git a/runtime/vm/compiler/backend/slot.h b/runtime/vm/compiler/backend/slot.h
index c73b017..1fbc213 100644
--- a/runtime/vm/compiler/backend/slot.h
+++ b/runtime/vm/compiler/backend/slot.h
@@ -95,6 +95,7 @@
V(ArgumentsDescriptor, ArrayLayout, count, Smi, FINAL) \
V(ArgumentsDescriptor, ArrayLayout, size, Smi, FINAL) \
V(PointerBase, PointerBaseLayout, data_field, Dynamic, FINAL) \
+ V(TypeArguments, TypeArgumentsLayout, length, Smi, FINAL) \
V(UnhandledException, UnhandledExceptionLayout, exception, Dynamic, FINAL) \
V(UnhandledException, UnhandledExceptionLayout, stacktrace, Dynamic, FINAL)
diff --git a/runtime/vm/compiler/compiler_pass.cc b/runtime/vm/compiler/compiler_pass.cc
index f253ffc..97af823 100644
--- a/runtime/vm/compiler/compiler_pass.cc
+++ b/runtime/vm/compiler/compiler_pass.cc
@@ -551,7 +551,7 @@
#if defined(DART_PRECOMPILER)
COMPILER_PASS(SerializeGraph, {
- if (state->precompiler == nullptr) return state;
+ if (state->precompiler == nullptr) return false;
if (auto stream = state->precompiler->il_serialization_stream()) {
auto file_write = Dart::file_write_callback();
ASSERT(file_write != nullptr);
diff --git a/runtime/vm/compiler/frontend/base_flow_graph_builder.cc b/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
index ac59909..fdcd957 100644
--- a/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
+++ b/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
@@ -279,11 +279,31 @@
}
}
+Fragment BaseFlowGraphBuilder::LoadArgDescriptor() {
+ if (has_saved_args_desc_array()) {
+ const ArgumentsDescriptor descriptor(saved_args_desc_array());
+ // Double-check that compile-time Size() matches runtime size on target.
+ ASSERT_EQUAL(descriptor.Size(),
+ FlowGraph::ParameterOffsetAt(function_, descriptor.Count(),
+ /*last_slot=*/false));
+ return Constant(saved_args_desc_array());
+ }
+ ASSERT(parsed_function_->has_arg_desc_var());
+ return LoadLocal(parsed_function_->arg_desc_var());
+}
+
Fragment BaseFlowGraphBuilder::TestTypeArgsLen(Fragment eq_branch,
Fragment neq_branch,
intptr_t num_type_args) {
Fragment test;
+ // Compile-time arguments descriptor case.
+ if (has_saved_args_desc_array()) {
+ const ArgumentsDescriptor descriptor(saved_args_desc_array_);
+ return descriptor.TypeArgsLen() == num_type_args ? eq_branch : neq_branch;
+ }
+
+ // Runtime arguments descriptor case.
TargetEntryInstr* eq_entry;
TargetEntryInstr* neq_entry;
diff --git a/runtime/vm/compiler/frontend/base_flow_graph_builder.h b/runtime/vm/compiler/frontend/base_flow_graph_builder.h
index 095d6d6..6cfd0b8 100644
--- a/runtime/vm/compiler/frontend/base_flow_graph_builder.h
+++ b/runtime/vm/compiler/frontend/base_flow_graph_builder.h
@@ -316,14 +316,7 @@
void InlineBailout(const char* reason);
- Fragment LoadArgDescriptor() {
- if (has_saved_args_desc_array()) {
- return Constant(saved_args_desc_array());
- }
- ASSERT(parsed_function_->has_arg_desc_var());
- return LoadLocal(parsed_function_->arg_desc_var());
- }
-
+ Fragment LoadArgDescriptor();
Fragment TestTypeArgsLen(Fragment eq_branch,
Fragment neq_branch,
intptr_t num_type_args);
diff --git a/runtime/vm/compiler/frontend/kernel_to_il.cc b/runtime/vm/compiler/frontend/kernel_to_il.cc
index eae3173..9e65018 100644
--- a/runtime/vm/compiler/frontend/kernel_to_il.cc
+++ b/runtime/vm/compiler/frontend/kernel_to_il.cc
@@ -1752,14 +1752,13 @@
}
BlockEntryInstr* FlowGraphBuilder::BuildPrologue(BlockEntryInstr* normal_entry,
- PrologueInfo* prologue_info,
- JoinEntryInstr* nsm) {
+ PrologueInfo* prologue_info) {
const bool compiling_for_osr = IsCompiledForOsr();
kernel::PrologueBuilder prologue_builder(
parsed_function_, last_used_block_id_, compiling_for_osr, IsInlining());
BlockEntryInstr* instruction_cursor =
- prologue_builder.BuildPrologue(normal_entry, prologue_info, nsm);
+ prologue_builder.BuildPrologue(normal_entry, prologue_info);
last_used_block_id_ = prologue_builder.last_used_block_id();
@@ -1835,6 +1834,7 @@
const Function& function) {
// This function is specialized for a receiver class, a method name, and
// the arguments descriptor at a call site.
+ const ArgumentsDescriptor descriptor(saved_args_desc_array());
graph_entry_ =
new (Z) GraphEntryInstr(*parsed_function_, Compiler::kNoOSRDeoptId);
@@ -1846,18 +1846,6 @@
BlockEntryInstr* instruction_cursor =
BuildPrologue(normal_entry, &prologue_info);
- // The backend will expect an array of default values for all the named
- // parameters, even if they are all known to be passed at the call site
- // because the call site matches the arguments descriptor. Use null for
- // the default values.
- ArgumentsDescriptor descriptor(saved_args_desc_array());
- ZoneGrowableArray<const Instance*>* default_values =
- new ZoneGrowableArray<const Instance*>(Z, descriptor.NamedCount());
- for (intptr_t i = 0; i < descriptor.NamedCount(); ++i) {
- default_values->Add(&Object::null_instance());
- }
- parsed_function_->set_default_parameter_values(default_values);
-
Fragment body(instruction_cursor);
body += CheckStackOverflowInPrologue(function.token_pos());
@@ -2153,10 +2141,38 @@
ASSERT(has_saved_args_desc_array());
const ArgumentsDescriptor descriptor(saved_args_desc_array());
- // Type argument length checking, including checking for delayed type
- // arguments, is already done in the prologue builder.
+ LocalVariable* temp = parsed_function_->expression_temp_var();
Fragment check_entry;
+ // We only need to check the length of any explicitly provided type arguments.
+ if (descriptor.TypeArgsLen() > 0) {
+ Fragment check_type_args_length;
+ check_type_args_length += LoadLocal(closure);
+ check_type_args_length += LoadNativeField(Slot::Closure_function());
+ check_type_args_length += LoadNativeField(Slot::Function_type_parameters());
+ check_type_args_length += StoreLocal(TokenPosition::kNoSource, temp);
+ TargetEntryInstr *null, *not_null;
+ check_type_args_length += BranchIfNull(&null, ¬_null);
+ check_type_args_length.current = not_null; // Continue in non-error case.
+
+ // The function is not generic.
+ Fragment(null) + Goto(nsm);
+
+ check_type_args_length += LoadLocal(temp);
+ check_type_args_length += LoadNativeField(Slot::TypeArguments_length());
+ check_type_args_length += IntConstant(descriptor.TypeArgsLen());
+ TargetEntryInstr *equal, *not_equal;
+ check_type_args_length += BranchIfEqual(&equal, ¬_equal);
+ check_type_args_length.current = equal; // Continue in non-error case.
+
+ Fragment(not_equal) + Goto(nsm);
+
+ // Type arguments should not be provided if there are delayed type
+ // arguments, as then the closure itself is not generic.
+ check_entry += TestDelayedTypeArgs(closure, /*present=*/Goto(nsm),
+ /*absent=*/check_type_args_length);
+ }
+
check_entry += LoadLocal(vars->has_named_params);
TargetEntryInstr *has_named, *has_positional;
check_entry += BranchIfTrue(&has_named, &has_positional);
@@ -2280,6 +2296,7 @@
FlowGraph* FlowGraphBuilder::BuildGraphOfInvokeFieldDispatcher(
const Function& function) {
+ const ArgumentsDescriptor descriptor(saved_args_desc_array());
// Find the name of the field we should dispatch to.
const Class& owner = Class::Handle(Z, function.Owner());
ASSERT(!owner.IsNull());
@@ -2302,36 +2319,6 @@
const bool is_closure_call = (owner.raw() == closure_class.raw()) &&
field_name.Equals(Symbols::Call());
- JoinEntryInstr* nsm = nullptr;
- if (is_dynamic_call && is_closure_call) {
- // Create a NSM block that can be shared with the prologue builder.
- nsm = BuildThrowNoSuchMethod();
- // The whole reason for making this invoke field dispatcher is that
- // this closure call needs checking, so we shouldn't inline a call to an
- // unchecked entry that can't tail call NSM.
- InlineBailout(
- "kernel::FlowGraphBuilder::BuildGraphOfInvokeFieldDispatcher");
- }
-
- // Set default parameters & construct argument names array.
- //
- // The backend will expect an array of default values for all the named
- // parameters, even if they are all known to be passed at the call site
- // because the call site matches the arguments descriptor. Use null for
- // the default values.
- const ArgumentsDescriptor descriptor(saved_args_desc_array());
- const Array& argument_names =
- Array::ZoneHandle(Z, Array::New(descriptor.NamedCount(), Heap::kOld));
- ZoneGrowableArray<const Instance*>* default_values =
- new ZoneGrowableArray<const Instance*>(Z, descriptor.NamedCount());
- String& string_handle = String::Handle(Z);
- for (intptr_t i = 0; i < descriptor.NamedCount(); ++i) {
- default_values->Add(&Object::null_instance());
- string_handle = descriptor.NameAt(i);
- argument_names.SetAt(i, string_handle);
- }
- parsed_function_->set_default_parameter_values(default_values);
-
graph_entry_ =
new (Z) GraphEntryInstr(*parsed_function_, Compiler::kNoOSRDeoptId);
@@ -2340,29 +2327,27 @@
PrologueInfo prologue_info(-1, -1);
BlockEntryInstr* instruction_cursor =
- BuildPrologue(normal_entry, &prologue_info, nsm);
+ BuildPrologue(normal_entry, &prologue_info);
Fragment body(instruction_cursor);
body += CheckStackOverflowInPrologue(function.token_pos());
- if (descriptor.TypeArgsLen() > 0) {
- LocalVariable* type_args = parsed_function_->function_type_arguments();
- ASSERT(type_args != NULL);
- body += LoadLocal(type_args);
- }
-
+ // Build any dynamic closure call checks before pushing arguments to the
+ // final call on the stack to make debugging easier.
LocalVariable* closure = NULL;
if (is_closure_call) {
closure = parsed_function_->ParameterVariable(0);
-
- // The closure itself is the first argument.
- body += LoadLocal(closure);
-
if (is_dynamic_call) {
- // We should have a throw NSM block from the prologue.
- ASSERT(nsm != nullptr);
+ // The whole reason for making this invoke field dispatcher is that
+ // this closure call needs checking, so we shouldn't inline a call to an
+ // unchecked entry that can't tail call NSM.
+ InlineBailout(
+ "kernel::FlowGraphBuilder::BuildGraphOfInvokeFieldDispatcher");
+
// Init the variables we'll be using for dynamic call checking.
body += BuildDynamicCallVarsInit(closure);
+
+ JoinEntryInstr* nsm = BuildThrowNoSuchMethod();
// Check that the shape of the arguments generally matches what the
// closure function expects. The only remaining non-type check after this
// is that the names for optional arguments are valid.
@@ -2372,7 +2357,29 @@
// in the closure body to here, using the dynamic versions of
// AssertSubtype to typecheck the type arguments using the runtime types
// available in the closure object.
+
+ // TODO(dartbug.com/40813): Move checks that are currently compiled
+ // in the closure body to here, using the dynamic versions of
+ // AssertAssignable to typecheck the parameters using the runtime types
+ // available in the closure object.
+ //
+ // For now, we check that any named arguments have valid names.
+ for (intptr_t pos = descriptor.PositionalCount();
+ pos < descriptor.Count(); pos++) {
+ body += BuildClosureCallNamedArgumentCheck(closure, pos, nsm);
+ }
}
+ }
+
+ if (descriptor.TypeArgsLen() > 0) {
+ LocalVariable* type_args = parsed_function_->function_type_arguments();
+ ASSERT(type_args != nullptr);
+ body += LoadLocal(type_args);
+ }
+
+ if (is_closure_call) {
+ // The closure itself is the first argument.
+ body += LoadLocal(closure);
} else {
// Invoke the getter to get the field value.
body += LoadLocal(parsed_function_->ParameterVariable(0));
@@ -2383,18 +2390,21 @@
}
// Push all arguments onto the stack.
- intptr_t pos = 1;
- for (; pos < descriptor.Count(); pos++) {
+ for (intptr_t pos = 1; pos < descriptor.Count(); pos++) {
body += LoadLocal(parsed_function_->ParameterVariable(pos));
- if (is_closure_call && is_dynamic_call) {
- // TODO(dartbug.com/40813): Move checks that are currently compiled
- // in the closure body to here, using the dynamic versions of
- // AssertAssignable to typecheck the parameters using the runtime types
- // available in the closure object.
- //
- // For now, we check that any named arguments have valid names.
- body += BuildClosureCallNamedArgumentCheck(closure, pos, nsm);
+ }
+
+ // Construct argument names array if necessary.
+ const Array* argument_names = &Object::null_array();
+ if (descriptor.NamedCount() > 0) {
+ const auto& array_handle =
+ Array::ZoneHandle(Z, Array::New(descriptor.NamedCount(), Heap::kNew));
+ String& string_handle = String::Handle(Z);
+ for (intptr_t i = 0; i < descriptor.NamedCount(); ++i) {
+ string_handle = descriptor.NameAt(i);
+ array_handle.SetAt(i, string_handle);
}
+ argument_names = &array_handle;
}
if (is_closure_call) {
@@ -2403,14 +2413,14 @@
body += LoadNativeField(Slot::Closure_function());
body += ClosureCall(TokenPosition::kNoSource, descriptor.TypeArgsLen(),
- descriptor.Count(), argument_names);
+ descriptor.Count(), *argument_names);
} else {
const intptr_t kNumArgsChecked = 1;
body +=
InstanceCall(TokenPosition::kMinSource,
is_dynamic_call ? Symbols::DynamicCall() : Symbols::Call(),
Token::kILLEGAL, descriptor.TypeArgsLen(),
- descriptor.Count(), argument_names, kNumArgsChecked);
+ descriptor.Count(), *argument_names, kNumArgsChecked);
}
body += Return(TokenPosition::kNoSource);
diff --git a/runtime/vm/compiler/frontend/kernel_to_il.h b/runtime/vm/compiler/frontend/kernel_to_il.h
index 19b0a0b..957807b 100644
--- a/runtime/vm/compiler/frontend/kernel_to_il.h
+++ b/runtime/vm/compiler/frontend/kernel_to_il.h
@@ -67,8 +67,7 @@
private:
BlockEntryInstr* BuildPrologue(BlockEntryInstr* normal_entry,
- PrologueInfo* prologue_info,
- JoinEntryInstr* nsm = nullptr);
+ PrologueInfo* prologue_info);
// Return names of optional named parameters of [function].
ArrayPtr GetOptionalParameterNames(const Function& function);
diff --git a/runtime/vm/compiler/frontend/prologue_builder.cc b/runtime/vm/compiler/frontend/prologue_builder.cc
index fc92e62..b829e8b 100644
--- a/runtime/vm/compiler/frontend/prologue_builder.cc
+++ b/runtime/vm/compiler/frontend/prologue_builder.cc
@@ -45,8 +45,7 @@
}
BlockEntryInstr* PrologueBuilder::BuildPrologue(BlockEntryInstr* entry,
- PrologueInfo* prologue_info,
- JoinEntryInstr* provided_nsm) {
+ PrologueInfo* prologue_info) {
// We always have to build the graph, but we only link it sometimes.
const bool link = !is_inlining_ && !compiling_for_osr_;
@@ -64,8 +63,7 @@
// NSM in appropriate spots if one was created.
JoinEntryInstr* nsm = nullptr;
if (check_shapes) {
- // If no block for throwing NSM was provided, create a new one.
- nsm = provided_nsm != nullptr ? provided_nsm : BuildThrowNoSuchMethod();
+ nsm = BuildThrowNoSuchMethod();
Fragment f = BuildTypeArgumentsLengthCheck(nsm, expect_type_args);
if (link) prologue += f;
}
@@ -527,8 +525,7 @@
handling += TestTypeArgsLen(store_null, store_type_args, 0);
const auto& function = parsed_function_->function();
- if (function.IsClosureFunction() ||
- function.IsDynamicClosureCallDispatcher(thread_)) {
+ if (function.IsClosureFunction()) {
LocalVariable* closure = parsed_function_->ParameterVariable(0);
// Currently, delayed type arguments can only be introduced through type
diff --git a/runtime/vm/compiler/frontend/prologue_builder.h b/runtime/vm/compiler/frontend/prologue_builder.h
index 74b93fb..58923f9 100644
--- a/runtime/vm/compiler/frontend/prologue_builder.h
+++ b/runtime/vm/compiler/frontend/prologue_builder.h
@@ -47,8 +47,7 @@
is_inlining_(is_inlining) {}
BlockEntryInstr* BuildPrologue(BlockEntryInstr* entry,
- PrologueInfo* prologue_info,
- JoinEntryInstr* nsm = nullptr);
+ PrologueInfo* prologue_info);
Fragment BuildOptionalParameterHandling(JoinEntryInstr* nsm,
LocalVariable* temp_var);
@@ -73,12 +72,13 @@
}
const Instance& DefaultParameterValueAt(intptr_t i) {
- if (parsed_function_->default_parameter_values() != NULL) {
+ if (parsed_function_->default_parameter_values() != nullptr) {
return parsed_function_->DefaultParameterValueAt(i);
}
-
- ASSERT(parsed_function_->function().kind() ==
- FunctionLayout::kNoSuchMethodDispatcher);
+ // Only invocation dispatchers that have compile-time arguments
+ // descriptors lack default parameter values (because their functions only
+ // have optional named parameters, all of which are provided in calls.)
+ ASSERT(has_saved_args_desc_array());
return Instance::null_instance();
}
diff --git a/runtime/vm/compiler/runtime_api.h b/runtime/vm/compiler/runtime_api.h
index 048038e..82be941 100644
--- a/runtime/vm/compiler/runtime_api.h
+++ b/runtime/vm/compiler/runtime_api.h
@@ -1294,6 +1294,7 @@
class TypeArguments : public AllStatic {
public:
static word instantiations_offset();
+ static word length_offset();
static word nullability_offset();
static word type_at_offset(intptr_t i);
static word InstanceSize();
diff --git a/runtime/vm/compiler/runtime_offsets_extracted.h b/runtime/vm/compiler/runtime_offsets_extracted.h
index 6320c51..d29d7b5 100644
--- a/runtime/vm/compiler/runtime_offsets_extracted.h
+++ b/runtime/vm/compiler/runtime_offsets_extracted.h
@@ -380,6 +380,7 @@
static constexpr dart::compiler::target::word Type_nullability_offset = 33;
static constexpr dart::compiler::target::word
TypeArguments_instantiations_offset = 4;
+static constexpr dart::compiler::target::word TypeArguments_length_offset = 8;
static constexpr dart::compiler::target::word TypeArguments_nullability_offset =
16;
static constexpr dart::compiler::target::word TypeRef_type_offset = 12;
@@ -887,6 +888,7 @@
static constexpr dart::compiler::target::word Type_nullability_offset = 61;
static constexpr dart::compiler::target::word
TypeArguments_instantiations_offset = 8;
+static constexpr dart::compiler::target::word TypeArguments_length_offset = 16;
static constexpr dart::compiler::target::word TypeArguments_nullability_offset =
32;
static constexpr dart::compiler::target::word TypeRef_type_offset = 24;
@@ -1390,6 +1392,7 @@
static constexpr dart::compiler::target::word Type_nullability_offset = 33;
static constexpr dart::compiler::target::word
TypeArguments_instantiations_offset = 4;
+static constexpr dart::compiler::target::word TypeArguments_length_offset = 8;
static constexpr dart::compiler::target::word TypeArguments_nullability_offset =
16;
static constexpr dart::compiler::target::word TypeRef_type_offset = 12;
@@ -1894,6 +1897,7 @@
static constexpr dart::compiler::target::word Type_nullability_offset = 61;
static constexpr dart::compiler::target::word
TypeArguments_instantiations_offset = 8;
+static constexpr dart::compiler::target::word TypeArguments_length_offset = 16;
static constexpr dart::compiler::target::word TypeArguments_nullability_offset =
32;
static constexpr dart::compiler::target::word TypeRef_type_offset = 24;
@@ -2397,6 +2401,7 @@
static constexpr dart::compiler::target::word Type_nullability_offset = 33;
static constexpr dart::compiler::target::word
TypeArguments_instantiations_offset = 4;
+static constexpr dart::compiler::target::word TypeArguments_length_offset = 8;
static constexpr dart::compiler::target::word TypeArguments_nullability_offset =
16;
static constexpr dart::compiler::target::word TypeRef_type_offset = 12;
@@ -2898,6 +2903,7 @@
static constexpr dart::compiler::target::word Type_nullability_offset = 61;
static constexpr dart::compiler::target::word
TypeArguments_instantiations_offset = 8;
+static constexpr dart::compiler::target::word TypeArguments_length_offset = 16;
static constexpr dart::compiler::target::word TypeArguments_nullability_offset =
32;
static constexpr dart::compiler::target::word TypeRef_type_offset = 24;
@@ -3395,6 +3401,7 @@
static constexpr dart::compiler::target::word Type_nullability_offset = 33;
static constexpr dart::compiler::target::word
TypeArguments_instantiations_offset = 4;
+static constexpr dart::compiler::target::word TypeArguments_length_offset = 8;
static constexpr dart::compiler::target::word TypeArguments_nullability_offset =
16;
static constexpr dart::compiler::target::word TypeRef_type_offset = 12;
@@ -3893,6 +3900,7 @@
static constexpr dart::compiler::target::word Type_nullability_offset = 61;
static constexpr dart::compiler::target::word
TypeArguments_instantiations_offset = 8;
+static constexpr dart::compiler::target::word TypeArguments_length_offset = 16;
static constexpr dart::compiler::target::word TypeArguments_nullability_offset =
32;
static constexpr dart::compiler::target::word TypeRef_type_offset = 24;
@@ -4427,6 +4435,8 @@
static constexpr dart::compiler::target::word AOT_Type_nullability_offset = 33;
static constexpr dart::compiler::target::word
AOT_TypeArguments_instantiations_offset = 4;
+static constexpr dart::compiler::target::word AOT_TypeArguments_length_offset =
+ 8;
static constexpr dart::compiler::target::word
AOT_TypeArguments_nullability_offset = 16;
static constexpr dart::compiler::target::word AOT_TypeRef_type_offset = 12;
@@ -4983,6 +4993,8 @@
static constexpr dart::compiler::target::word AOT_Type_nullability_offset = 61;
static constexpr dart::compiler::target::word
AOT_TypeArguments_instantiations_offset = 8;
+static constexpr dart::compiler::target::word AOT_TypeArguments_length_offset =
+ 16;
static constexpr dart::compiler::target::word
AOT_TypeArguments_nullability_offset = 32;
static constexpr dart::compiler::target::word AOT_TypeRef_type_offset = 24;
@@ -5544,6 +5556,8 @@
static constexpr dart::compiler::target::word AOT_Type_nullability_offset = 61;
static constexpr dart::compiler::target::word
AOT_TypeArguments_instantiations_offset = 8;
+static constexpr dart::compiler::target::word AOT_TypeArguments_length_offset =
+ 16;
static constexpr dart::compiler::target::word
AOT_TypeArguments_nullability_offset = 32;
static constexpr dart::compiler::target::word AOT_TypeRef_type_offset = 24;
@@ -6099,6 +6113,8 @@
static constexpr dart::compiler::target::word AOT_Type_nullability_offset = 33;
static constexpr dart::compiler::target::word
AOT_TypeArguments_instantiations_offset = 4;
+static constexpr dart::compiler::target::word AOT_TypeArguments_length_offset =
+ 8;
static constexpr dart::compiler::target::word
AOT_TypeArguments_nullability_offset = 16;
static constexpr dart::compiler::target::word AOT_TypeRef_type_offset = 12;
@@ -6648,6 +6664,8 @@
static constexpr dart::compiler::target::word AOT_Type_nullability_offset = 61;
static constexpr dart::compiler::target::word
AOT_TypeArguments_instantiations_offset = 8;
+static constexpr dart::compiler::target::word AOT_TypeArguments_length_offset =
+ 16;
static constexpr dart::compiler::target::word
AOT_TypeArguments_nullability_offset = 32;
static constexpr dart::compiler::target::word AOT_TypeRef_type_offset = 24;
@@ -7202,6 +7220,8 @@
static constexpr dart::compiler::target::word AOT_Type_nullability_offset = 61;
static constexpr dart::compiler::target::word
AOT_TypeArguments_instantiations_offset = 8;
+static constexpr dart::compiler::target::word AOT_TypeArguments_length_offset =
+ 16;
static constexpr dart::compiler::target::word
AOT_TypeArguments_nullability_offset = 32;
static constexpr dart::compiler::target::word AOT_TypeRef_type_offset = 24;
diff --git a/runtime/vm/compiler/runtime_offsets_list.h b/runtime/vm/compiler/runtime_offsets_list.h
index 0dc6a35..10cfdcd 100644
--- a/runtime/vm/compiler/runtime_offsets_list.h
+++ b/runtime/vm/compiler/runtime_offsets_list.h
@@ -250,6 +250,7 @@
FIELD(Type, type_state_offset) \
FIELD(Type, nullability_offset) \
FIELD(TypeArguments, instantiations_offset) \
+ FIELD(TypeArguments, length_offset) \
FIELD(TypeArguments, nullability_offset) \
FIELD(TypeRef, type_offset) \
FIELD(TypedDataBase, length_offset) \
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 360d974..4f366ee 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -2875,9 +2875,7 @@
// Whether this function can receive an invocation where the number and names
// of arguments have not been checked.
- bool CanReceiveDynamicInvocation() const {
- return IsFfiTrampoline() || IsDynamicClosureCallDispatcher();
- }
+ bool CanReceiveDynamicInvocation() const { return IsFfiTrampoline(); }
bool HasThisParameter() const {
return IsDynamicFunction(/*allow_abstract=*/true) ||
@@ -7569,6 +7567,9 @@
// Hash value for a type argument vector consisting solely of dynamic types.
static const intptr_t kAllDynamicHash = 1;
+ static intptr_t length_offset() {
+ return OFFSET_OF(TypeArgumentsLayout, length_);
+ }
intptr_t Length() const;
AbstractTypePtr TypeAt(intptr_t index) const;
AbstractTypePtr TypeAtNullSafe(intptr_t index) const;
diff --git a/tests/language/value_class/creates_constructor_test.dart b/tests/language/value_class/creates_constructor_test.dart
index 3ad9379..0e42beb 100644
--- a/tests/language/value_class/creates_constructor_test.dart
+++ b/tests/language/value_class/creates_constructor_test.dart
@@ -4,7 +4,7 @@
// A value class will automatically create an empty constructor if there is none yet
-const String valueClass = "valueClass";
+import 'value_class_support_lib.dart';
@valueClass
class Animal {
diff --git a/tests/language/value_class/creates_equals_test.dart b/tests/language/value_class/creates_equals_test.dart
index c62683f..fdb2a68 100644
--- a/tests/language/value_class/creates_equals_test.dart
+++ b/tests/language/value_class/creates_equals_test.dart
@@ -5,11 +5,10 @@
// Equals operator == by value should be implicitly created
import 'package:expect/expect.dart';
+import 'value_class_support_lib.dart';
// A value class will automatically create an == operator if there is none yet
-const String valueClass = "valueClass";
-
@valueClass
class Animal {
final int numberOfLegs;
diff --git a/tests/language/value_class/has_non_final_field_error_test.dart b/tests/language/value_class/has_non_final_field_error_test.dart
index 148471e..d0ed8e5 100644
--- a/tests/language/value_class/has_non_final_field_error_test.dart
+++ b/tests/language/value_class/has_non_final_field_error_test.dart
@@ -4,7 +4,7 @@
// It is a compile-time error if a value class has a non-final instance variable.
-const String valueClass = "valueClass";
+import 'value_class_support_lib.dart';
@valueClass
class Animal {
diff --git a/tests/language/value_class/inherits_non_value_class_error_test.dart b/tests/language/value_class/inherits_non_value_class_error_test.dart
index 9f65fca..b667c4e 100644
--- a/tests/language/value_class/inherits_non_value_class_error_test.dart
+++ b/tests/language/value_class/inherits_non_value_class_error_test.dart
@@ -4,7 +4,7 @@
// Value classes are always leaves in the tree of types
-const String valueClass = "valueClass";
+import 'value_class_support_lib.dart';
@valueClass
class Animal {}
diff --git a/tests/language/value_class/value_class_support_lib.dart b/tests/language/value_class/value_class_support_lib.dart
new file mode 100644
index 0000000..e5d014d
--- /dev/null
+++ b/tests/language/value_class/value_class_support_lib.dart
@@ -0,0 +1,21 @@
+// 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.
+
+// TODO(jlcontreras): this is a temp file for the valueClass experiment
+const valueClass = "valueClass";
+
+/// This code is from the dart.math sdk/lib/math/jenkins_smi_hash.dart
+class JenkinsSmiHash {
+ static int combine(int hash, int value) {
+ hash = 0x1fffffff & (hash + value);
+ hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
+ return hash ^ (hash >> 6);
+ }
+
+ static int finish(int hash) {
+ hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
+ hash = hash ^ (hash >> 11);
+ return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
+ }
+}
diff --git a/tools/VERSION b/tools/VERSION
index 4c0e772..a5cb519 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 10
PATCH 0
-PRERELEASE 100
+PRERELEASE 101
PRERELEASE_PATCH 0
\ No newline at end of file