blob: fce5b7eb1178c9ab198494de5cc53bbade2a98fd [file] [log] [blame]
library test;
//
// Problems in library:
//
// pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart:26:77: 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);
}