| library /*isNonNullableByDefault*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/enhanced_enums/enum_as_supertype_error.dart:5:7: Error: Non-abstract class 'A' has 'Enum' as a superinterface. |
| // class A extends Enum { // Error. |
| // ^ |
| // |
| // pkg/front_end/testcases/enhanced_enums/enum_as_supertype_error.dart:9:7: Error: Non-abstract class 'B' has 'Enum' as a superinterface. |
| // class B implements Enum { // Error. |
| // ^ |
| // |
| // pkg/front_end/testcases/enhanced_enums/enum_as_supertype_error.dart:15:7: Error: Non-abstract class 'EnumClass' has 'Enum' as a superinterface. |
| // class EnumClass extends EnumInterface { // Error. |
| // ^ |
| // |
| // pkg/front_end/testcases/enhanced_enums/enum_as_supertype_error.dart:16:11: Error: 'EnumClass' has 'Enum' as a superinterface and can't contain non-static members with name 'index'. |
| // int get index => 0; // Error |
| // ^^^^^ |
| // |
| // pkg/front_end/testcases/enhanced_enums/enum_as_supertype_error.dart:21:7: Error: Non-abstract class 'EnumClass2' has 'Enum' as a superinterface. |
| // class EnumClass2 extends AbstractEnumClass {} // Error. |
| // ^ |
| // |
| // pkg/front_end/testcases/enhanced_enums/enum_as_supertype_error.dart:27:7: Error: Non-abstract class 'EnumClass3' has 'Enum' as a superinterface. |
| // class EnumClass3 extends AbstractEnumClass2 {} // Error. |
| // ^ |
| // |
| // pkg/front_end/testcases/enhanced_enums/enum_as_supertype_error.dart:5:7: Error: The non-abstract class 'A' is missing implementations for these members: |
| // - Enum.index |
| // Try to either |
| // - provide an implementation, |
| // - inherit an implementation from a superclass or mixin, |
| // - mark the class as abstract, or |
| // - provide a 'noSuchMethod' implementation. |
| // |
| // class A extends Enum { // Error. |
| // ^ |
| // sdk/lib/core/enum.dart:22:11: Context: 'Enum.index' is defined here. |
| // int get index; |
| // ^^^^^ |
| // |
| // pkg/front_end/testcases/enhanced_enums/enum_as_supertype_error.dart:9:7: Error: The non-abstract class 'B' is missing implementations for these members: |
| // - Enum.index |
| // Try to either |
| // - provide an implementation, |
| // - inherit an implementation from a superclass or mixin, |
| // - mark the class as abstract, or |
| // - provide a 'noSuchMethod' implementation. |
| // |
| // class B implements Enum { // Error. |
| // ^ |
| // sdk/lib/core/enum.dart:22:11: Context: 'Enum.index' is defined here. |
| // int get index; |
| // ^^^^^ |
| // |
| // pkg/front_end/testcases/enhanced_enums/enum_as_supertype_error.dart:21:7: Error: The non-abstract class 'EnumClass2' is missing implementations for these members: |
| // - Enum.index |
| // Try to either |
| // - provide an implementation, |
| // - inherit an implementation from a superclass or mixin, |
| // - mark the class as abstract, or |
| // - provide a 'noSuchMethod' implementation. |
| // |
| // class EnumClass2 extends AbstractEnumClass {} // Error. |
| // ^^^^^^^^^^ |
| // sdk/lib/core/enum.dart:22:11: Context: 'Enum.index' is defined here. |
| // int get index; |
| // ^^^^^ |
| // |
| // pkg/front_end/testcases/enhanced_enums/enum_as_supertype_error.dart:27:7: Error: The non-abstract class 'EnumClass3' is missing implementations for these members: |
| // - Enum.index |
| // Try to either |
| // - provide an implementation, |
| // - inherit an implementation from a superclass or mixin, |
| // - mark the class as abstract, or |
| // - provide a 'noSuchMethod' implementation. |
| // |
| // class EnumClass3 extends AbstractEnumClass2 {} // Error. |
| // ^^^^^^^^^^ |
| // sdk/lib/core/enum.dart:22:11: Context: 'Enum.index' is defined here. |
| // int get index; |
| // ^^^^^ |
| // |
| // pkg/front_end/testcases/enhanced_enums/enum_as_supertype_error.dart:25:16: Error: 'Object' doesn't implement 'Enum' so it can't be used with 'EnumMixin'. |
| // - 'Object' is from 'dart:core'. |
| // - 'Enum' is from 'dart:core'. |
| // - 'EnumMixin' is from 'pkg/front_end/testcases/enhanced_enums/enum_as_supertype_error.dart'. |
| // abstract class AbstractEnumClass2 with EnumMixin {} |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| class A extends core::Enum { |
| synthetic constructor •() → self::A |
| : super core::Enum::•() |
| ; |
| get foo() → core::int |
| return this.{core::Enum::index}{core::int}; |
| no-such-method-forwarder get /* from org-dartlang-sdk:///sdk/lib/core/enum.dart */ _name() → core::String |
| return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::String; |
| } |
| class B extends core::Object implements core::Enum { |
| synthetic constructor •() → self::B |
| : super core::Object::•() |
| ; |
| get foo() → core::int |
| return this.{core::Enum::index}{core::int}; |
| no-such-method-forwarder get /* from org-dartlang-sdk:///sdk/lib/core/enum.dart */ _name() → core::String |
| return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::String; |
| } |
| abstract class EnumInterface extends core::Object implements core::Enum { |
| synthetic constructor •() → self::EnumInterface |
| : super core::Object::•() |
| ; |
| } |
| class EnumClass extends self::EnumInterface { |
| synthetic constructor •() → self::EnumClass |
| : super self::EnumInterface::•() |
| ; |
| get index() → core::int |
| return 0; |
| no-such-method-forwarder get /* from org-dartlang-sdk:///sdk/lib/core/enum.dart */ _name() → core::String |
| return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::String; |
| } |
| abstract class AbstractEnumClass extends self::EnumInterface { |
| synthetic constructor •() → self::AbstractEnumClass |
| : super self::EnumInterface::•() |
| ; |
| } |
| class EnumClass2 extends self::AbstractEnumClass { |
| synthetic constructor •() → self::EnumClass2 |
| : super self::AbstractEnumClass::•() |
| ; |
| no-such-method-forwarder get /* from org-dartlang-sdk:///sdk/lib/core/enum.dart */ _name() → core::String |
| return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::String; |
| } |
| abstract class EnumMixin extends core::Enum /*isMixinDeclaration*/ { |
| } |
| abstract class _AbstractEnumClass2&Object&EnumMixin = core::Object with self::EnumMixin /*isAnonymousMixin,hasConstConstructor*/ { |
| const synthetic constructor •() → self::_AbstractEnumClass2&Object&EnumMixin |
| : super core::Object::•() |
| ; |
| } |
| abstract class AbstractEnumClass2 extends self::_AbstractEnumClass2&Object&EnumMixin { |
| synthetic constructor •() → self::AbstractEnumClass2 |
| : super self::_AbstractEnumClass2&Object&EnumMixin::•() |
| ; |
| } |
| class EnumClass3 extends self::AbstractEnumClass2 { |
| synthetic constructor •() → self::EnumClass3 |
| : super self::AbstractEnumClass2::•() |
| ; |
| no-such-method-forwarder get /* from org-dartlang-sdk:///sdk/lib/core/enum.dart */ _name() → core::String |
| return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 1, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4))){(core::Invocation) → dynamic} as{TypeError,ForDynamic,ForNonNullableByDefault} core::String; |
| } |
| static method main() → dynamic {} |
| |
| constants { |
| #C1 = #org-dartlang-testcase:///enum_as_supertype_error.dart::_name |
| #C2 = <core::Type*>[] |
| #C3 = <dynamic>[] |
| #C4 = <core::Symbol*, dynamic>{) |
| } |