| library test; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart:20:68: Error: A value of type 'int' can't be assigned to a variable of type 'String'. |
| // String z = /*error:INVALID_ASSIGNMENT*/ new C(). /*@target=C.x*/ x; |
| // ^ |
| // |
| import self as self; |
| import "infer_type_regardless_of_declaration_order_or_cycles_b.dart" as inf; |
| import "dart:core" as core; |
| |
| import "org-dartlang-testcase:///infer_type_regardless_of_declaration_order_or_cycles_b.dart"; |
| |
| class C extends inf::B { |
| synthetic constructor •() → self::C* |
| : super inf::B::•() |
| ; |
| get x() → core::int* |
| return null; |
| } |
| class A extends core::Object { |
| synthetic constructor •() → self::A* |
| : super core::Object::•() |
| ; |
| get x() → core::int* |
| return 0; |
| 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 foo() → dynamic { |
| core::int* y = new self::C::•().{self::C::x}{core::int*}; |
| core::String* z = let final Never* #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart:20:68: Error: A value of type 'int' can't be assigned to a variable of type 'String'. |
| String z = /*error:INVALID_ASSIGNMENT*/ new C(). /*@target=C.x*/ x; |
| ^" in new self::C::•().{self::C::x}{core::int*} as{TypeError} core::String*; |
| } |
| static method main() → dynamic { |
| self::foo(); |
| } |
| |
| library; |
| import self as inf; |
| import "infer_type_regardless_of_declaration_order_or_cycles.dart" as self; |
| |
| import "org-dartlang-testcase:///infer_type_regardless_of_declaration_order_or_cycles.dart"; |
| |
| class B extends self::A { |
| synthetic constructor •() → inf::B* |
| : super self::A::•() |
| ; |
| } |
| static method main() → dynamic {} |