| library test /*isNonNullableByDefault*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart:27:29: Error: A value of type 'String' can't be assigned to a variable of type 'int'. |
| // . /*@target=A.value*/ value; |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| import "infer_types_on_generic_instantiations_in_library_cycle_a.dart" as inf; |
| |
| import "org-dartlang-testcase:///infer_types_on_generic_instantiations_in_library_cycle_a.dart"; |
| |
| abstract class A<E extends core::Object? = dynamic> extends core::Object implements inf::I<self::A::E%> { |
| final field self::A::E% value = throw ""; |
| synthetic constructor •() → self::A<self::A::E%> |
| : super core::Object::•() |
| ; |
| } |
| abstract class M extends core::Object { |
| final field core::int y = 0; |
| synthetic constructor •() → self::M |
| : super core::Object::•() |
| ; |
| } |
| class B<E extends core::Object? = dynamic> extends self::A<self::B::E%> implements self::M { |
| synthetic constructor •() → self::B<self::B::E%> |
| : super self::A::•() |
| ; |
| get y() → core::int |
| return 0; |
| method m(dynamic a, (dynamic, core::int) → dynamic f) → self::A<self::B::E%> |
| return throw ""; |
| } |
| static method foo() → dynamic { |
| core::int y = invalid-expression "pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart:27:29: Error: A value of type 'String' can't be assigned to a variable of type 'int'. |
| . /*@target=A.value*/ value; |
| ^" in new self::B::•<core::String>().{self::B::m}(throw "", throw ""){(dynamic, (dynamic, core::int) → dynamic) → self::A<core::String>}.{self::A::value}{core::String} as{TypeError,ForNonNullableByDefault} core::int; |
| core::String z = new self::B::•<core::String>().{self::B::m}(throw "", throw ""){(dynamic, (dynamic, core::int) → dynamic) → self::A<core::String>}.{self::A::value}{core::String}; |
| } |
| static method main() → dynamic {} |
| |
| library /*isNonNullableByDefault*/; |
| import self as inf; |
| import "dart:core" as core; |
| import "infer_types_on_generic_instantiations_in_library_cycle.dart" as self; |
| |
| import "org-dartlang-testcase:///infer_types_on_generic_instantiations_in_library_cycle.dart"; |
| |
| abstract class I<E extends core::Object? = dynamic> extends core::Object { |
| synthetic constructor •() → inf::I<inf::I::E%> |
| : super core::Object::•() |
| ; |
| abstract method m(dynamic a, (dynamic, core::int) → core::String f) → self::A<inf::I::E%>; |
| } |
| static method main() → dynamic {} |