| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/general/issue43721.dart:18:3: Error: Inferred type argument 'FutureOr<num>' doesn't conform to the bound 'FutureOr<int>' of the type variable 'T' on 'error'. |
| // Try specifying type arguments explicitly so that they conform to the bounds. |
| // error(z); // Error. |
| // ^ |
| // pkg/front_end/testcases/general/issue43721.dart:10:7: Context: This is the type variable whose bound isn't conformed to. |
| // error<T extends FutureOr<int>>(T t) {} |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| import "dart:async"; |
| |
| static method ok<T extends FutureOr<core::num*>*>(self::ok::T* t) → dynamic {} |
| static method error<T extends FutureOr<core::int*>*>(self::error::T* t) → dynamic {} |
| static method bar(core::bool* condition) → dynamic { |
| FutureOr<core::int*>* x = null; |
| core::num* n = 1; |
| FutureOr<core::num*>* z = condition ?{FutureOr<core::num*>*} x : n; |
| self::ok<FutureOr<core::num*>*>(z); |
| self::error<FutureOr<core::num*>*>(z); |
| } |
| static method main() → dynamic {} |