| library /*isNonNullableByDefault*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:21:5: Error: Inferred type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'. |
| // - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'. |
| // - 'Object' is from 'dart:core'. |
| // Try specifying type arguments explicitly so that they conform to the bounds. |
| // A.foo(); // Error. |
| // ^ |
| // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:16:11: Context: This is the type variable whose bound isn't conformed to. |
| // typedef A<X extends G<C<X>>> = C<X>; |
| // ^ |
| // |
| // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:23:3: Error: Inferred type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'. |
| // - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'. |
| // - 'Object' is from 'dart:core'. |
| // Try specifying type arguments explicitly so that they conform to the bounds. |
| // B(); // Error. |
| // ^ |
| // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:17:11: Context: This is the type variable whose bound isn't conformed to. |
| // typedef B<X extends G<D<X>>> = D<X>; |
| // ^ |
| // |
| // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:20:3: Error: Inferred type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'. |
| // - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'. |
| // - 'Object' is from 'dart:core'. |
| // Try specifying type arguments explicitly so that they conform to the bounds. |
| // A(); // Error. |
| // ^ |
| // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:16:11: Context: This is the type variable whose bound isn't conformed to. |
| // typedef A<X extends G<C<X>>> = C<X>; |
| // ^ |
| // |
| // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:22:5: Error: Inferred type argument 'C<Object?> Function(C<Never>)' doesn't conform to the bound 'C<X> Function(C<X>)' of the type variable 'X' on 'A'. |
| // - 'C' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'. |
| // - 'Object' is from 'dart:core'. |
| // Try specifying type arguments explicitly so that they conform to the bounds. |
| // A.bar(); // Error. |
| // ^ |
| // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:16:11: Context: This is the type variable whose bound isn't conformed to. |
| // typedef A<X extends G<C<X>>> = C<X>; |
| // ^ |
| // |
| // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:24:5: Error: Inferred type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'. |
| // - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'. |
| // - 'Object' is from 'dart:core'. |
| // Try specifying type arguments explicitly so that they conform to the bounds. |
| // B.foo(); // Error. |
| // ^ |
| // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:17:11: Context: This is the type variable whose bound isn't conformed to. |
| // typedef B<X extends G<D<X>>> = D<X>; |
| // ^ |
| // |
| // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:25:5: Error: Inferred type argument 'D<Object?> Function(D<Never>)' doesn't conform to the bound 'D<X> Function(D<X>)' of the type variable 'X' on 'B'. |
| // - 'D' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart'. |
| // - 'Object' is from 'dart:core'. |
| // Try specifying type arguments explicitly so that they conform to the bounds. |
| // B.bar(); // Error. |
| // ^ |
| // pkg/front_end/testcases/nonfunction_type_aliases/issue45519_2.dart:17:11: Context: This is the type variable whose bound isn't conformed to. |
| // typedef B<X extends G<D<X>>> = D<X>; |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| typedef G<invariant X extends core::Object? = dynamic> = (X%) → X%; |
| typedef A<X extends (self::C<X>) → self::C<X> = (self::C<dynamic>) → self::C<dynamic>> = self::C<X>; |
| typedef B<X extends (self::D<X>) → self::D<X> = (self::D<dynamic>) → self::D<dynamic>> = self::D<X>; |
| class C<X extends core::Object? = dynamic> extends core::Object { |
| static final field dynamic _redirecting# = <dynamic>[self::C::bar]/*isLegacy*/; |
| constructor foo() → self::C<self::C::X%> |
| : super core::Object::•() {} |
| static factory •<X extends core::Object? = dynamic>() → self::C<self::C::•::X%> |
| return new self::C::foo<self::C::•::X%>(); |
| static factory bar<X extends core::Object? = dynamic>() → self::C<self::C::bar::X%> |
| let <X extends core::Object? = dynamic>() → self::C<X%> #redirecting_factory = self::C::• in let self::C::bar::X% #typeArg0 = null in invalid-expression; |
| } |
| class D<X extends core::Object? = dynamic> extends core::Object { |
| static final field dynamic _redirecting# = <dynamic>[self::D::bar]/*isLegacy*/; |
| constructor •() → self::D<self::D::X%> |
| : super core::Object::•() |
| ; |
| static factory foo<X extends core::Object? = dynamic>() → self::D<self::D::foo::X%> |
| return new self::D::•<self::D::foo::X%>(); |
| static factory bar<X extends core::Object? = dynamic>() → self::D<self::D::bar::X%> |
| let Never #redirecting_factory = self::D::• in let self::D::bar::X% #typeArg0 = null in invalid-expression; |
| } |
| static method test() → dynamic { |
| self::C::•<(self::C<Never>) → self::C<core::Object?>>(); |
| new self::C::foo<(self::C<Never>) → self::C<core::Object?>>(); |
| self::C::•<(self::C<Never>) → self::C<core::Object?>>(); |
| new self::D::•<(self::D<Never>) → self::D<core::Object?>>(); |
| self::D::foo<(self::D<Never>) → self::D<core::Object?>>(); |
| new self::D::•<(self::D<Never>) → self::D<core::Object?>>(); |
| } |
| static method main() → dynamic {} |