blob: 8445171c3a48f7e538fb660136ab6af336233614 [file] [log] [blame]
library test;
//
// Problems in library:
//
// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:22:59: Error: Inferred type argument 'NotA' doesn't conform to the bound 'A' of the type variable 'T' on 'C'.
// - 'NotA' is from 'pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart'.
// - 'A' 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: This is the type variable whose bound isn't conformed to.
// class C<T extends A> {
// ^
//
// pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart:21:29: Error: Inferred type argument 'NotA' doesn't conform to the bound 'A' of the type variable 'T' on 'C'.
// - 'NotA' is from 'pkg/front_end/testcases/inference/constructors_infer_from_arguments_argument_not_assignable.dart'.
// - 'A' 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: This is the type variable whose bound isn't conformed to.
// class C<T extends A> {
// ^
//
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::•()
;
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
}
class C<T extends self::A* = self::A*> extends core::Object {
constructor •(() →* self::C::T* f) self::C<self::C::T*>*
: super core::Object::•()
;
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
}
class NotA extends core::Object {
synthetic constructor •() self::NotA*
: super core::Object::•()
;
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 myF() self::NotA*
return null;
static method main() dynamic {
self::C<self::NotA*>* x = new self::C::•<self::NotA*>(#C1);
}
constants {
#C1 = tearoff self::myF
}