blob: 9dc6b9b43697af58e968194834db6ef8d1b95533 [file] [log] [blame]
library test;
//
// Problems in library:
//
// pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:26:70: Error: Inferred type argument 'Object' doesn't conform to the bound 'num' of the type variable 'T' on 'T Function<T extends num>(T, T)'.
// - 'Object' is from 'dart:core'.
// Try specifying type arguments explicitly so that they conform to the bounds.
// takeOOI(/*error:COULD_NOT_INFER,error:INVALID_CAST_FUNCTION*/ math.max);
// ^
//
// pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:28:73: Error: The argument type 'num Function(num, num)' can't be assigned to the parameter type 'int Function(double, int)'.
// /*error:COULD_NOT_INFER,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ math.max);
// ^
//
// pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:30:73: Error: The argument type 'num Function(num, num)' can't be assigned to the parameter type 'double Function(int, double)'.
// /*error:COULD_NOT_INFER,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ math.max);
// ^
//
// pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:31:70: Error: Inferred type argument 'Object' doesn't conform to the bound 'num' of the type variable 'T' on 'T Function<T extends num>(T, T)'.
// - 'Object' is from 'dart:core'.
// Try specifying type arguments explicitly so that they conform to the bounds.
// takeOON(/*error:COULD_NOT_INFER,error:INVALID_CAST_FUNCTION*/ math.max);
// ^
//
// pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:32:70: Error: Inferred type argument 'Object' doesn't conform to the bound 'num' of the type variable 'T' on 'T Function<T extends num>(T, T)'.
// - 'Object' is from 'dart:core'.
// Try specifying type arguments explicitly so that they conform to the bounds.
// takeOOO(/*error:COULD_NOT_INFER,error:INVALID_CAST_FUNCTION*/ math.max);
// ^
//
// pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:45:65: Error: Inferred type argument 'Object' doesn't conform to the bound 'num' of the type variable 'T' on 'T Function<T extends num>(T, T)'.
// - 'Object' is from 'dart:core'.
// Try specifying type arguments explicitly so that they conform to the bounds.
// takeOOI(/*error:COULD_NOT_INFER,error:INVALID_CAST_FUNCTION*/ min);
// ^
//
// pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:46:72: Error: The argument type 'num Function(num, num)' can't be assigned to the parameter type 'int Function(double, int)'.
// takeIDI(/*error:COULD_NOT_INFER,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ min);
// ^
//
// pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:47:72: Error: The argument type 'num Function(num, num)' can't be assigned to the parameter type 'double Function(int, double)'.
// takeDID(/*error:COULD_NOT_INFER,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ min);
// ^
//
// pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:48:65: Error: Inferred type argument 'Object' doesn't conform to the bound 'num' of the type variable 'T' on 'T Function<T extends num>(T, T)'.
// - 'Object' is from 'dart:core'.
// Try specifying type arguments explicitly so that they conform to the bounds.
// takeOON(/*error:COULD_NOT_INFER,error:INVALID_CAST_FUNCTION*/ min);
// ^
//
// pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:49:65: Error: Inferred type argument 'Object' doesn't conform to the bound 'num' of the type variable 'T' on 'T Function<T extends num>(T, T)'.
// - 'Object' is from 'dart:core'.
// Try specifying type arguments explicitly so that they conform to the bounds.
// takeOOO(/*error:COULD_NOT_INFER,error:INVALID_CAST_FUNCTION*/ min);
// ^
//
// pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:73:25: Error: Inferred type argument 'Object' doesn't conform to the bound 'num' of the type variable 'T' on 'T Function<T extends num>(T, T)'.
// - 'Object' is from 'dart:core'.
// Try specifying type arguments explicitly so that they conform to the bounds.
// . /*@target=C.m*/ m);
// ^
//
// pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:75:25: Error: Inferred type argument 'Object' doesn't conform to the bound 'num' of the type variable 'T' on 'T Function<T extends num>(T, T)'.
// - 'Object' is from 'dart:core'.
// Try specifying type arguments explicitly so that they conform to the bounds.
// . /*@target=C.m*/ m);
// ^
//
// pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:82:25: Error: Inferred type argument 'Object' doesn't conform to the bound 'num' of the type variable 'T' on 'T Function<T extends num>(T, T)'.
// - 'Object' is from 'dart:core'.
// Try specifying type arguments explicitly so that they conform to the bounds.
// . /*@target=C.m*/ m);
// ^
//
// pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:86:29: Error: The argument type 'num Function(num, num)' can't be assigned to the parameter type 'int Function(double, int)'.
// . /*@target=C.m*/ m);
// ^
//
// pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:89:29: Error: The argument type 'num Function(num, num)' can't be assigned to the parameter type 'double Function(int, double)'.
// . /*@target=C.m*/ m);
// ^
//
import self as self;
import "dart:core" as core;
import "dart:math" as math;
import "dart:math" show min;
class C extends core::Object {
synthetic constructor •() → self::C*
: super core::Object::•()
;
method m<T extends core::num*>(self::C::m::T* x, self::C::m::T* y) → self::C::m::T*
return null;
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 test() → dynamic {
self::takeIII(#C1<core::int*>);
self::takeDDD(#C1<core::double*>);
self::takeNNN(#C1<core::num*>);
self::takeIDN(#C1<core::num*>);
self::takeDIN(#C1<core::num*>);
self::takeIIN(#C1<core::int*>);
self::takeDDN(#C1<core::double*>);
self::takeIIO(#C1<core::int*>);
self::takeDDO(#C1<core::double*>);
self::takeOOI((#C1<core::Object*>) as{TypeError} (core::Object*, core::Object*) →* core::int*);
self::takeIDI(let final Never* #t1 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:28:73: Error: The argument type 'num Function(num, num)' can't be assigned to the parameter type 'int Function(double, int)'.
/*error:COULD_NOT_INFER,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ math.max);
^" in (#C1<core::num*>) as{TypeError} (core::double*, core::int*) →* core::int*);
self::takeDID(let final Never* #t2 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:30:73: Error: The argument type 'num Function(num, num)' can't be assigned to the parameter type 'double Function(int, double)'.
/*error:COULD_NOT_INFER,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ math.max);
^" in (#C1<core::num*>) as{TypeError} (core::int*, core::double*) →* core::double*);
self::takeOON((#C1<core::Object*>) as{TypeError} (core::Object*, core::Object*) →* core::num*);
self::takeOOO((#C1<core::Object*>) as{TypeError} (core::Object*, core::Object*) →* core::num*);
self::takeIII(#C2<core::int*>);
self::takeDDD(#C2<core::double*>);
self::takeNNN(#C2<core::num*>);
self::takeIDN(#C2<core::num*>);
self::takeDIN(#C2<core::num*>);
self::takeIIN(#C2<core::int*>);
self::takeDDN(#C2<core::double*>);
self::takeIIO(#C2<core::int*>);
self::takeDDO(#C2<core::double*>);
self::takeOOI((#C2<core::Object*>) as{TypeError} (core::Object*, core::Object*) →* core::int*);
self::takeIDI(let final Never* #t3 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:46:72: Error: The argument type 'num Function(num, num)' can't be assigned to the parameter type 'int Function(double, int)'.
takeIDI(/*error:COULD_NOT_INFER,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ min);
^" in (#C2<core::num*>) as{TypeError} (core::double*, core::int*) →* core::int*);
self::takeDID(let final Never* #t4 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:47:72: Error: The argument type 'num Function(num, num)' can't be assigned to the parameter type 'double Function(int, double)'.
takeDID(/*error:COULD_NOT_INFER,error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ min);
^" in (#C2<core::num*>) as{TypeError} (core::int*, core::double*) →* core::double*);
self::takeOON((#C2<core::Object*>) as{TypeError} (core::Object*, core::Object*) →* core::num*);
self::takeOOO((#C2<core::Object*>) as{TypeError} (core::Object*, core::Object*) →* core::num*);
self::takeIII(new self::C::•().{self::C::m}{<T extends core::num*>(T*, T*) →* T*}<core::int*>);
self::takeDDD(new self::C::•().{self::C::m}{<T extends core::num*>(T*, T*) →* T*}<core::double*>);
self::takeNNN(new self::C::•().{self::C::m}{<T extends core::num*>(T*, T*) →* T*}<core::num*>);
self::takeIDN(new self::C::•().{self::C::m}{<T extends core::num*>(T*, T*) →* T*}<core::num*>);
self::takeDIN(new self::C::•().{self::C::m}{<T extends core::num*>(T*, T*) →* T*}<core::num*>);
self::takeIIN(new self::C::•().{self::C::m}{<T extends core::num*>(T*, T*) →* T*}<core::int*>);
self::takeDDN(new self::C::•().{self::C::m}{<T extends core::num*>(T*, T*) →* T*}<core::double*>);
self::takeIIO(new self::C::•().{self::C::m}{<T extends core::num*>(T*, T*) →* T*}<core::int*>);
self::takeDDO(new self::C::•().{self::C::m}{<T extends core::num*>(T*, T*) →* T*}<core::double*>);
self::takeOON((new self::C::•().{self::C::m}{<T extends core::num*>(T*, T*) →* T*}<core::Object*>) as{TypeError} (core::Object*, core::Object*) →* core::num*);
self::takeOOO((new self::C::•().{self::C::m}{<T extends core::num*>(T*, T*) →* T*}<core::Object*>) as{TypeError} (core::Object*, core::Object*) →* core::num*);
self::takeOOI((new self::C::•().{self::C::m}{<T extends core::num*>(T*, T*) →* T*}<core::Object*>) as{TypeError} (core::Object*, core::Object*) →* core::int*);
self::takeIDI(let final Never* #t5 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:86:29: Error: The argument type 'num Function(num, num)' can't be assigned to the parameter type 'int Function(double, int)'.
. /*@target=C.m*/ m);
^" in (new self::C::•().{self::C::m}{<T extends core::num*>(T*, T*) →* T*}<core::num*>) as{TypeError} (core::double*, core::int*) →* core::int*);
self::takeDID(let final Never* #t6 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_infer_generic_instantiation.dart:89:29: Error: The argument type 'num Function(num, num)' can't be assigned to the parameter type 'double Function(int, double)'.
. /*@target=C.m*/ m);
^" in (new self::C::•().{self::C::m}{<T extends core::num*>(T*, T*) →* T*}<core::num*>) as{TypeError} (core::int*, core::double*) →* core::double*);
}
static method takeIII((core::int*, core::int*) →* core::int* fn) → void {}
static method takeDDD((core::double*, core::double*) →* core::double* fn) → void {}
static method takeIDI((core::double*, core::int*) →* core::int* fn) → void {}
static method takeDID((core::int*, core::double*) →* core::double* fn) → void {}
static method takeIDN((core::double*, core::int*) →* core::num* fn) → void {}
static method takeDIN((core::int*, core::double*) →* core::num* fn) → void {}
static method takeIIN((core::int*, core::int*) →* core::num* fn) → void {}
static method takeDDN((core::double*, core::double*) →* core::num* fn) → void {}
static method takeNNN((core::num*, core::num*) →* core::num* fn) → void {}
static method takeOON((core::Object*, core::Object*) →* core::num* fn) → void {}
static method takeOOO((core::Object*, core::Object*) →* core::num* fn) → void {}
static method takeOOI((core::Object*, core::Object*) →* core::int* fn) → void {}
static method takeIIO((core::int*, core::int*) →* core::Object* fn) → void {}
static method takeDDO((core::double*, core::double*) →* core::Object* fn) → void {}
static method main() → dynamic {}
constants {
#C1 = tearoff math::max
#C2 = tearoff math::min
}
Extra constant evaluation status:
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:16:16 -> InstantiationConstant(max<int*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:17:16 -> InstantiationConstant(max<double*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:18:16 -> InstantiationConstant(max<num*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:19:16 -> InstantiationConstant(max<num*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:20:16 -> InstantiationConstant(max<num*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:21:16 -> InstantiationConstant(max<int*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:22:16 -> InstantiationConstant(max<double*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:23:16 -> InstantiationConstant(max<int*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:24:16 -> InstantiationConstant(max<double*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:26:70 -> InstantiationConstant(max<Object*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:28:73 -> InstantiationConstant(max<num*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:30:73 -> InstantiationConstant(max<num*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:31:70 -> InstantiationConstant(max<Object*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:32:70 -> InstantiationConstant(max<Object*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:35:11 -> InstantiationConstant(min<int*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:36:11 -> InstantiationConstant(min<double*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:37:11 -> InstantiationConstant(min<num*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:38:11 -> InstantiationConstant(min<num*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:39:11 -> InstantiationConstant(min<num*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:40:11 -> InstantiationConstant(min<int*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:41:11 -> InstantiationConstant(min<double*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:42:11 -> InstantiationConstant(min<int*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:43:11 -> InstantiationConstant(min<double*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:45:65 -> InstantiationConstant(min<Object*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:46:72 -> InstantiationConstant(min<num*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:47:72 -> InstantiationConstant(min<num*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:48:65 -> InstantiationConstant(min<Object*>)
Evaluated: Instantiation @ org-dartlang-testcase:///generic_methods_infer_generic_instantiation.dart:49:65 -> InstantiationConstant(min<Object*>)
Extra constant evaluation: evaluated: 133, effectively constant: 28