blob: 264593759444fdbe5ba29ea7a5fae726ca208688 [file] [log] [blame]
library test;
//
// 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);
// ^
// sdk/lib/_internal/vm/lib/math_patch.dart: Context: This is the type variable whose bound isn't conformed to.
//
// 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(
// ^
// sdk/lib/_internal/vm/lib/math_patch.dart: Context: This is the type variable whose bound isn't conformed to.
//
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} core::num);
core::Object b = math::max<core::num>(x, y as{TypeError,ForDynamic} core::num);
dynamic c = math::max<dynamic>(x, y);
dynamic d = math::max<dynamic>(x, y);
}
static method main() dynamic {}