blob: 96c5ec22bceab68c9664a442e541da8334b05524 [file] [log] [blame]
library test;
//
// Problems in library:
//
// pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart:26:80: Error: Inferred type argument 'int' doesn't conform to the bound 'String' of the type variable 'U' on 'Foo<String>.method'.
// - 'Foo' is from 'pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart'.
// Try specifying type arguments explicitly so that they conform to the bounds.
// . /*error:COULD_NOT_INFER*/ /*@ typeArgs=int* */ /*@target=Foo::method*/ method(
// ^
//
import self as self;
import "dart:core" as core;
class Foo<T extends core::Pattern* = core::Pattern*> extends core::Object {
synthetic constructor •() self::Foo<self::Foo::T*>*
: super core::Object::•()
;
method method<generic-covariant-impl U extends self::Foo::T* = self::Foo::T*>(self::Foo::method::U* u) self::Foo::method::U*
return u;
}
static method main() dynamic {
new self::Foo::•<core::String*>().{self::Foo::method}<core::int*>(42);
}