blob: e17397c189fa487d36d6a957d5fa2f7a455cbb93 [file] [log] [blame]
// Formatted problems:
//
// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:22:56: Error: Inferred type argument 'NotA' violates the corresponding type variable bound of 'C'.
// - 'NotA' is from 'pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart'.
// Try specifying type arguments explicitly so that they conform to the bounds.
// new /*error:COULD_NOT_INFER*/ /*@typeArgs=NotA*/ C(myF);
// ^
// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:12:9: Context: Bound of this variable is violated.
// class C<T extends A> {
// ^
//
// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:21:25: Error: Inferred type argument 'NotA' violates the corresponding type variable bound of 'C'.
// - 'NotA' is from 'pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart'.
// Try specifying type arguments explicitly so that they conform to the bounds.
// var /*@type=C<NotA>*/ x =
// ^
// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:12:9: Context: Bound of this variable is violated.
// class C<T extends A> {
// ^
// Unhandled errors:
//
// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:22:56: Error: Inferred type argument 'NotA' violates the corresponding type variable bound of 'C'.
// - 'NotA' is from 'pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart'.
// Try specifying type arguments explicitly so that they conform to the bounds.
// new /*error:COULD_NOT_INFER*/ /*@typeArgs=NotA*/ C(myF);
// ^
//
// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:21:25: Error: Inferred type argument 'NotA' violates the corresponding type variable bound of 'C'.
// - 'NotA' is from 'pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart'.
// Try specifying type arguments explicitly so that they conform to the bounds.
// var /*@type=C<NotA>*/ x =
// ^
library test;
import self as self;
import "dart:core" as core;
typedef F<T extends core::Object = dynamic> = () T;
class A extends core::Object {
synthetic constructor •() self::A
: super core::Object::•()
;
}
class C<T extends self::A = self::A> extends core::Object {
constructor •(() self::C::T f) self::C<self::C::T>
: super core::Object::•()
;
}
class NotA extends core::Object {
synthetic constructor •() self::NotA
: super core::Object::•()
;
}
static method myF() self::NotA
return null;
static method main() dynamic {
self::C<self::NotA> x = new self::C::•<self::NotA>(self::myF);
}