| library /*isNonNullableByDefault*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:15:3: Error: Inferred type argument 'A<Object?>' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'A'. |
| // - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.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/issue42446.dart:5:9: Context: This is the type variable whose bound isn't conformed to. |
| // class A<X extends A<X>> {} |
| // ^ |
| // |
| // pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:17:3: Error: Inferred type argument 'A2<Object?>' doesn't conform to the bound 'A2<X>' of the type variable 'X' on 'A2'. |
| // - 'A2' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'. |
| // - 'Object' is from 'dart:core'. |
| // Try specifying type arguments explicitly so that they conform to the bounds. |
| // A2(); // Error. |
| // ^ |
| // pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:8:10: Context: This is the type variable whose bound isn't conformed to. |
| // class A2<X extends A2<X>> { |
| // ^ |
| // |
| // pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:14:3: Error: Inferred type argument 'A<Object?>' doesn't conform to the bound 'A<X>' of the type variable 'X' on 'B'. |
| // - 'A' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.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/issue42446.dart:6:11: Context: This is the type variable whose bound isn't conformed to. |
| // typedef B<X extends A<X>> = A<X>; |
| // ^ |
| // |
| // pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:16:3: Error: Inferred type argument 'A2<Object?>' doesn't conform to the bound 'A2<X>' of the type variable 'X' on 'B2'. |
| // - 'A2' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'. |
| // - 'Object' is from 'dart:core'. |
| // Try specifying type arguments explicitly so that they conform to the bounds. |
| // B2(); // Error. |
| // ^ |
| // pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:11:12: Context: This is the type variable whose bound isn't conformed to. |
| // typedef B2<X extends A2<X>> = A2<X>; |
| // ^ |
| // |
| // pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:16:3: Error: Inferred type argument 'A2<Object?>' doesn't conform to the bound 'A2<X>' of the type variable 'X' on 'A2'. |
| // - 'A2' is from 'pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart'. |
| // - 'Object' is from 'dart:core'. |
| // Try specifying type arguments explicitly so that they conform to the bounds. |
| // B2(); // Error. |
| // ^ |
| // pkg/front_end/testcases/nonfunction_type_aliases/issue42446.dart:8:10: Context: This is the type variable whose bound isn't conformed to. |
| // class A2<X extends A2<X>> { |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| typedef B<X extends self::A<X> = self::A<dynamic>> = self::A<X>; |
| typedef B2<X extends self::A2<X> = self::A2<dynamic>> = self::A2<X>; |
| class A<X extends self::A<self::A::X> = self::A<dynamic>> extends core::Object { |
| synthetic constructor •() → self::A<self::A::X> |
| : super core::Object::•() |
| ; |
| } |
| class A2<X extends self::A2<self::A2::X> = self::A2<dynamic>> extends core::Object { |
| static factory •<X extends self::A2<self::A2::•::X> = self::A2<dynamic>>() → self::A2<self::A2::•::X> |
| return throw 42; |
| } |
| static method foo() → dynamic { |
| new self::A::•<self::A<core::Object?>>(); |
| new self::A::•<self::A<core::Object?>>(); |
| self::A2::•<self::A2<core::Object?>>(); |
| self::A2::•<self::A2<core::Object?>>(); |
| } |
| static method main() → dynamic {} |