| library /*isNonNullableByDefault*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/general/bounds_enums.dart:11:6: Error: Inferred type argument 'A<dynamic>' doesn't conform to the bound 'Y Function(Y)' of the type variable 'Y' on 'E1'. |
| // Try specifying type arguments explicitly so that they conform to the bounds. |
| // enum E1<Y extends A<Y>> /* Error */ { |
| // ^ |
| // pkg/front_end/testcases/general/bounds_enums.dart:11:9: Context: This is the type variable whose bound isn't conformed to. |
| // enum E1<Y extends A<Y>> /* Error */ { |
| // ^ |
| // pkg/front_end/testcases/general/bounds_enums.dart:11:6: Context: If you want 'E1<A<dynamic>>' to be a super-bounded type, note that the inverted type 'E1<A<Never>>' must then satisfy its bounds, which it does not. |
| // - 'E1' is from 'pkg/front_end/testcases/general/bounds_enums.dart'. |
| // enum E1<Y extends A<Y>> /* Error */ { |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| typedef A<invariant X extends core::Object? = dynamic> = (X%) → X%; |
| class B<X extends core::Object? = dynamic> extends core::Object { |
| synthetic constructor •() → self::B<self::B::X%> |
| : super core::Object::•() |
| ; |
| } |
| class E1<Y extends (self::E1::Y) → self::E1::Y = (dynamic) → dynamic> extends core::_Enum /*isEnum*/ { |
| static const field core::List<self::E1<(dynamic) → dynamic>> values = #C4; |
| static const field self::E1<Never> e1 = #C3; |
| const constructor •(core::int #index, core::String #name) → self::E1<self::E1::Y> |
| : super core::_Enum::•(#index, #name) |
| ; |
| method toString() → core::String |
| return "E1.${this.{core::_Enum::_name}{core::String}}"; |
| } |
| class E2<Y extends self::B<self::E2::Y> = self::B<dynamic>> extends core::_Enum /*isEnum*/ { |
| static const field core::List<self::E2<self::B<dynamic>>> values = #C7; |
| static const field self::E2<Never> e2 = #C6; |
| const constructor •(core::int #index, core::String #name) → self::E2<self::E2::Y> |
| : super core::_Enum::•(#index, #name) |
| ; |
| method toString() → core::String |
| return "E2.${this.{core::_Enum::_name}{core::String}}"; |
| } |
| class E3<Y extends self::E3<self::E3::Y> = self::E3<dynamic>> extends core::_Enum /*isEnum*/ { |
| static const field core::List<self::E3<self::E3<dynamic>>> values = #C10; |
| static const field self::E3<Never> e3 = #C9; |
| const constructor •(core::int #index, core::String #name) → self::E3<self::E3::Y> |
| : super core::_Enum::•(#index, #name) |
| ; |
| method toString() → core::String |
| return "E3.${this.{core::_Enum::_name}{core::String}}"; |
| } |
| static method main() → dynamic {} |
| |
| constants { |
| #C1 = 0 |
| #C2 = "e1" |
| #C3 = self::E1<Never*> {index:#C1, _name:#C2} |
| #C4 = <self::E1<dynamic>*>[#C3] |
| #C5 = "e2" |
| #C6 = self::E2<Never*> {index:#C1, _name:#C5} |
| #C7 = <self::E2<dynamic>*>[#C6] |
| #C8 = "e3" |
| #C9 = self::E3<Never*> {index:#C1, _name:#C8} |
| #C10 = <self::E3<dynamic>*>[#C9] |
| } |
| |
| |
| Constructor coverage from constants: |
| org-dartlang-testcase:///bounds_enums.dart: |
| - E1. (from org-dartlang-testcase:///bounds_enums.dart:11:6) |
| - _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart) |
| - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) |
| - E2. (from org-dartlang-testcase:///bounds_enums.dart:15:6) |
| - E3. (from org-dartlang-testcase:///bounds_enums.dart:19:6) |