| library test; |
| import self as self; |
| import "dart:core" as core; |
| |
| class A<T extends core::Object = dynamic> extends core::Object { |
| generic-covariant-impl field self::A::T x = null; |
| synthetic constructor •() → self::A<self::A::T> |
| : super core::Object::•() |
| ; |
| } |
| class B<E extends core::Object = dynamic> extends self::A<self::B::E> { |
| generic-covariant-impl field self::B::E y = null; |
| synthetic constructor •() → self::B<self::B::E> |
| : super self::A::•() |
| ; |
| get x() → self::B::E |
| return this.{self::B::y}; |
| } |
| static method foo() → dynamic { |
| core::int y = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart:18:74: Error: A value of type 'dart.core::String' can't be assigned to a variable of type 'dart.core::int'. |
| Try changing the type of the left hand side, or casting the right hand side to 'dart.core::int'. |
| int y = /*error:INVALID_ASSIGNMENT*/ new B<String>(). /*@target=B::x*/ x; |
| ^" in new self::B::•<core::String>().{self::B::x} as{TypeError} core::int; |
| core::String z = new self::B::•<core::String>().{self::B::x}; |
| } |
| static method main() → dynamic { |
| self::foo(); |
| } |