blob: a6aefc2f22f5256edf724e94702bf5c06ec512cd [file] [log] [blame]
library test /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/inference/downward_inference_fixes_no_upwards_errors.dart:18:65: 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:19:81: 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;
import "dart:math";
static method f(core::num x, dynamic y) dynamic {
core::num a = math::max<core::num>(x, y as{TypeError,ForDynamic,ForNonNullableByDefault} core::num);
core::Object b = math::max<core::num>(x, y as{TypeError,ForDynamic,ForNonNullableByDefault} core::num);
dynamic c = math::max<dynamic>(x, y);
dynamic d = math::max<dynamic>(x, y);
}
static method main() dynamic {}