blob: b512907484a49c737bc1385238906ab2142d7f3a [file] [log] [blame]
library test;
//
// Problems in library:
//
// pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart:26:79: 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;
abstract member-signature get _identityHashCode() core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) core::bool*; -> core::Object::==
abstract member-signature get hashCode() core::int*; -> core::Object::hashCode
abstract member-signature method toString() core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() core::Type*; -> core::Object::runtimeType
}
static method main() dynamic {
new self::Foo::•<core::String*>().{self::Foo::method}<core::int*>(42);
}