| // Formatted problems: |
| // |
| // pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart:22:110: Error: Inferred type argument 'test::Clonable<dynamic>' violates the corresponding type variable bound of 'Pair::_'. |
| // Try specifying type arguments explicitly so that they conform to the bounds. |
| // new /*error:COULD_NOT_INFER,error:COULD_NOT_INFER*/ /*@typeArgs=Clonable<dynamic>, Clonable<dynamic>*/ Pair |
| // ^ |
| // pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart:10:12: Context: Bound of this variable is violated. |
| // class Pair<T extends Clonable<T>, U extends Clonable<U>> { |
| // ^ |
| // |
| // pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart:22:110: Error: Inferred type argument 'test::Clonable<dynamic>' violates the corresponding type variable bound of 'Pair::_'. |
| // Try specifying type arguments explicitly so that they conform to the bounds. |
| // new /*error:COULD_NOT_INFER,error:COULD_NOT_INFER*/ /*@typeArgs=Clonable<dynamic>, Clonable<dynamic>*/ Pair |
| // ^ |
| // pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart:10:35: Context: Bound of this variable is violated. |
| // class Pair<T extends Clonable<T>, U extends Clonable<U>> { |
| // ^ |
| |
| // Unhandled errors: |
| // |
| // pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart:22:110: Error: Inferred type argument 'test::Clonable<dynamic>' violates the corresponding type variable bound of 'Pair::_'. |
| // Try specifying type arguments explicitly so that they conform to the bounds. |
| // new /*error:COULD_NOT_INFER,error:COULD_NOT_INFER*/ /*@typeArgs=Clonable<dynamic>, Clonable<dynamic>*/ Pair |
| // ^ |
| // |
| // pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart:22:110: Error: Inferred type argument 'test::Clonable<dynamic>' violates the corresponding type variable bound of 'Pair::_'. |
| // Try specifying type arguments explicitly so that they conform to the bounds. |
| // new /*error:COULD_NOT_INFER,error:COULD_NOT_INFER*/ /*@typeArgs=Clonable<dynamic>, Clonable<dynamic>*/ Pair |
| // ^ |
| |
| library test; |
| import self as self; |
| import "dart:core" as core; |
| |
| class Clonable<T extends core::Object = dynamic> extends core::Object { |
| synthetic constructor •() → self::Clonable<self::Clonable::T> |
| : super core::Object::•() |
| ; |
| } |
| class Pair<T extends self::Clonable<self::Pair::T> = self::Clonable<dynamic>, U extends self::Clonable<self::Pair::U> = self::Clonable<dynamic>> extends core::Object { |
| generic-covariant-impl field self::Pair::T t; |
| generic-covariant-impl field self::Pair::U u; |
| constructor •(self::Pair::T t, self::Pair::U u) → self::Pair<self::Pair::T, self::Pair::U> |
| : self::Pair::t = t, self::Pair::u = u, super core::Object::•() |
| ; |
| constructor _() → self::Pair<self::Pair::T, self::Pair::U> |
| : self::Pair::u = null, self::Pair::t = null, super core::Object::•() |
| ; |
| get reversed() → self::Pair<self::Pair::U, self::Pair::T> |
| return new self::Pair::•<self::Pair::U, self::Pair::T>(this.{self::Pair::u}, this.{self::Pair::t}); |
| } |
| static method main() → dynamic { |
| final self::Pair<self::Clonable<dynamic>, self::Clonable<dynamic>> x = new self::Pair::_<self::Clonable<dynamic>, self::Clonable<dynamic>>(); |
| } |