blob: c556866a5e963a63158bd59403e64385170b1a37 [file] [log] [blame]
library test;
//
// Problems in library:
//
// pkg/front_end/testcases/inference/downward_inference_fixes_no_upwards_errors.dart:21:63: Error: Inferred type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'T' on 'max'.
// Try specifying type arguments explicitly so that they conform to the bounds.
// dynamic c = /*error:COULD_NOT_INFER*/ /*@typeArgs=dynamic*/ max(x, y);
// ^
//
// pkg/front_end/testcases/inference/downward_inference_fixes_no_upwards_errors.dart:22:77: Error: Inferred type argument 'dynamic' doesn't conform to the bound 'num' of the type variable 'T' on 'max'.
// Try specifying type arguments explicitly so that they conform to the bounds.
// var /*@type=dynamic*/ d = /*error:COULD_NOT_INFER*/ /*@typeArgs=dynamic*/ max(
// ^
//
import self as self;
import "dart:core" as core;
import "dart:math" as math;
static method f() dynamic {
core::num x;
dynamic y;
core::num a = math::max<core::num>(x, y as{TypeError} core::num);
core::Object b = math::max<core::num>(x, y as{TypeError} core::num);
dynamic c = math::max<dynamic>(x, y);
dynamic d = math::max<dynamic>(x, y);
}
static method main() dynamic {}