blob: 6b36422d5de3682c7c6748bc28f41fc4fe47b820 [file] [log] [blame]
library test;
import self as self;
import "dart:core" as core;
class Clonable<T extends core::Object> extends core::Object {
synthetic constructor •() void
: super core::Object::•()
;
}
class Pair<T extends self::Clonable<self::Pair::T>, U extends self::Clonable<self::Pair::U>> extends core::Object {
generic-covariant-impl generic-covariant-interface field self::Pair::T t;
generic-covariant-impl generic-covariant-interface field self::Pair::U u;
constructor •(self::Pair::T t, self::Pair::U u) void
: self::Pair::t = t, self::Pair::u = u, super core::Object::•()
;
constructor _() void
: 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 const field dynamic #errors = const <dynamic>["pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart:22:110: Error: Can't use a super-bounded type for instance creation. Got 'test::Pair<test::Clonable<dynamic>, test::Clonable<dynamic>>'.
new /*error:COULD_NOT_INFER,error:COULD_NOT_INFER*/ /*@typeArgs=Clonable<dynamic>, Clonable<dynamic>*/ Pair
^"]/* from null */;
static method main() → dynamic {
final self::Pair<self::Clonable<dynamic>, self::Clonable<dynamic>> x = new self::Pair::_<self::Clonable<dynamic>, self::Clonable<dynamic>>();
}