blob: eca2eebdf866eb7775d9bd7b527be4553b4b62d0 [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/value_class/non_value_extends_value_error.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;
// ^^^^^^^^^^^^
//
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 = null;
synthetic constructor •({required core::int numberOfLegs}) self::Animal
: self::Animal::numberOfLegs = numberOfLegs, super core::Object::•()
;
operator /*isLegacy*/ ==(core::Object other) core::bool
return other is self::Animal && this.{self::Animal::numberOfLegs}{core::int} =={core::num::==}{(core::Object) core::bool} other{self::Animal}.{self::Animal::numberOfLegs}{core::int};
get /*isLegacy*/ hashCode() core::int
return val::JenkinsSmiHash::finish(val::JenkinsSmiHash::combine("org-dartlang-testcase:///non_value_extends_value_error.dartAnimal".{core::String::hashCode}{core::int}, this.{self::Animal::numberOfLegs}{core::int}.{core::num::hashCode}{core::int}));
method /*isLegacy*/ toString() core::String
return "Animal(numberOfLegs: ${this.{self::Animal::numberOfLegs}{core::int}.{core::int::toString}(){() → core::String}})";
method /*isLegacy*/ copyWith({core::int numberOfLegs}) dynamic
return new self::Animal::•(numberOfLegs: numberOfLegs);
}
class Cat extends self::Animal {
synthetic constructor •() self::Cat
: super self::Animal::•()
;
}
static method main() dynamic {}
library /*isNonNullableByDefault*/;
import self as val;
import "dart:core" as core;
class JenkinsSmiHash extends core::Object {
synthetic constructor •() val::JenkinsSmiHash
: super core::Object::•()
;
static method combine(core::int hash, core::int value) core::int {
hash = 536870911.{core::int::&}(hash.{core::num::+}(value){(core::num) core::int}){(core::int) core::int};
hash = 536870911.{core::int::&}(hash.{core::num::+}(524287.{core::int::&}(hash){(core::int) core::int}.{core::int::<<}(10){(core::int) core::int}){(core::num) core::int}){(core::int) core::int};
return hash.{core::int::^}(hash.{core::int::>>}(6){(core::int) core::int}){(core::int) core::int};
}
static method finish(core::int hash) core::int {
hash = 536870911.{core::int::&}(hash.{core::num::+}(67108863.{core::int::&}(hash){(core::int) core::int}.{core::int::<<}(3){(core::int) core::int}){(core::num) core::int}){(core::int) core::int};
hash = hash.{core::int::^}(hash.{core::int::>>}(11){(core::int) core::int}){(core::int) core::int};
return 536870911.{core::int::&}(hash.{core::num::+}(16383.{core::int::&}(hash){(core::int) core::int}.{core::int::<<}(15){(core::int) core::int}){(core::num) core::int}){(core::int) core::int};
}
}
static const field core::String valueClass = #C1;
constants {
#C1 = "valueClass"
}