| library /*isNonNullableByDefault*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/constructor_tearoffs/bound_checks_in_type_literals.dart:11:20: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'T' on 'C'. |
| // - 'Object' is from 'dart:core'. |
| // Try changing type arguments so that they conform to the bounds. |
| // var test3 = (() => C<Object>)(); |
| // ^ |
| // pkg/front_end/testcases/constructor_tearoffs/bound_checks_in_type_literals.dart:5:9: Context: This is the type variable whose bound isn't conformed to. |
| // class C<T extends num> {} |
| // ^ |
| // |
| // pkg/front_end/testcases/constructor_tearoffs/bound_checks_in_type_literals.dart:7:11: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'T' on 'C'. |
| // - 'Object' is from 'dart:core'. |
| // Try changing type arguments so that they conform to the bounds. |
| // test() => C<Object>; |
| // ^ |
| // pkg/front_end/testcases/constructor_tearoffs/bound_checks_in_type_literals.dart:5:9: Context: This is the type variable whose bound isn't conformed to. |
| // class C<T extends num> {} |
| // ^ |
| // |
| // pkg/front_end/testcases/constructor_tearoffs/bound_checks_in_type_literals.dart:9:17: Error: Type argument 'Object' doesn't conform to the bound 'num' of the type variable 'T' on 'C'. |
| // - 'Object' is from 'dart:core'. |
| // Try changing type arguments so that they conform to the bounds. |
| // test2([Type t = C<Object>]) {} |
| // ^ |
| // pkg/front_end/testcases/constructor_tearoffs/bound_checks_in_type_literals.dart:5:9: Context: This is the type variable whose bound isn't conformed to. |
| // class C<T extends num> {} |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| class C<T extends core::num> extends core::Object { |
| synthetic constructor •() → self::C<self::C::T> |
| : super core::Object::•() |
| ; |
| } |
| static field core::Type test3 = (() → core::Type => #C1)(){() → core::Type}; |
| static method test() → dynamic |
| return #C1; |
| static method test2([core::Type t = #C1]) → dynamic {} |
| static method main() → dynamic {} |
| |
| constants { |
| #C1 = TypeLiteralConstant(self::C<core::Object>) |
| } |