| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/records/type_record_as_supertype.dart:11:16: Error: 'Record' is restricted and can't be extended or implemented. |
| // abstract class A1 extends Record {} // Error. |
| // ^ |
| // |
| // pkg/front_end/testcases/records/type_record_as_supertype.dart:11:27: Error: The class 'Record' can't be extended outside of its library because it's a final class. |
| // abstract class A1 extends Record {} // Error. |
| // ^ |
| // |
| // pkg/front_end/testcases/records/type_record_as_supertype.dart:13:16: Error: 'Record' is restricted and can't be extended or implemented. |
| // abstract class A2 extends RR {} // Error. |
| // ^ |
| // pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias. |
| // typedef RR = R; |
| // ^ |
| // |
| // pkg/front_end/testcases/records/type_record_as_supertype.dart:13:27: Error: The class 'Record' can't be extended outside of its library because it's a final class. |
| // abstract class A2 extends RR {} // Error. |
| // ^ |
| // |
| // pkg/front_end/testcases/records/type_record_as_supertype.dart:19:16: Error: 'Record' is restricted and can't be extended or implemented. |
| // abstract class B1 implements Record {} // Error. |
| // ^ |
| // |
| // pkg/front_end/testcases/records/type_record_as_supertype.dart:19:30: Error: The class 'Record' can't be implemented outside of its library because it's a final class. |
| // abstract class B1 implements Record {} // Error. |
| // ^ |
| // |
| // pkg/front_end/testcases/records/type_record_as_supertype.dart:21:16: Error: 'Record' is restricted and can't be extended or implemented. |
| // abstract class B2 implements RR {} // Error. |
| // ^ |
| // pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias. |
| // typedef RR = R; |
| // ^ |
| // |
| // pkg/front_end/testcases/records/type_record_as_supertype.dart:21:30: Error: The class 'Record' can't be implemented outside of its library because it's a final class. |
| // abstract class B2 implements RR {} // Error. |
| // ^ |
| // |
| // pkg/front_end/testcases/records/type_record_as_supertype.dart:27:16: Error: 'Record' is restricted and can't be extended or implemented. |
| // abstract class C1 with Record {} // Error. |
| // ^ |
| // |
| // pkg/front_end/testcases/records/type_record_as_supertype.dart:27:24: Error: The class 'Record' can't be used as a mixin because it isn't a mixin class nor a mixin. |
| // abstract class C1 with Record {} // Error. |
| // ^ |
| // |
| // pkg/front_end/testcases/records/type_record_as_supertype.dart:27:16: Error: The type 'C1' must be 'base', 'final' or 'sealed' because the supertype 'Record' is 'final'. |
| // Try adding 'base', 'final', or 'sealed' to the type. |
| // abstract class C1 with Record {} // Error. |
| // ^ |
| // |
| // pkg/front_end/testcases/records/type_record_as_supertype.dart:29:16: Error: 'Record' is restricted and can't be extended or implemented. |
| // abstract class C2 with RR {} // Error. |
| // ^ |
| // pkg/front_end/testcases/records/type_record_as_supertype.dart:7:9: Context: The issue arises via this type alias. |
| // typedef RR = R; |
| // ^ |
| // |
| // pkg/front_end/testcases/records/type_record_as_supertype.dart:29:16: Error: 'RR' is restricted and can't be extended or implemented. |
| // abstract class C2 with RR {} // Error. |
| // ^ |
| // sdk/lib/core/record.dart:*: Context: This is the type denoted by the type alias. |
| // abstract final class Record { |
| // ^ |
| // |
| // pkg/front_end/testcases/records/type_record_as_supertype.dart:29:24: Error: The class 'Record' can't be used as a mixin because it isn't a mixin class nor a mixin. |
| // abstract class C2 with RR {} // Error. |
| // ^ |
| // |
| // pkg/front_end/testcases/records/type_record_as_supertype.dart:29:16: Error: The type 'C2' must be 'base', 'final' or 'sealed' because the supertype 'Record' is 'final'. |
| // Try adding 'base', 'final', or 'sealed' to the type. |
| // abstract class C2 with RR {} // Error. |
| // ^ |
| // |
| // pkg/front_end/testcases/records/type_record_as_supertype.dart:31:24: Error: The class 'G' can't be used as a mixin because it isn't a mixin class nor a mixin. |
| // abstract class C3 with G<Record> {} // Ok. |
| // ^ |
| // |
| // pkg/front_end/testcases/records/type_record_as_supertype.dart:33:24: Error: The class 'G' can't be used as a mixin because it isn't a mixin class nor a mixin. |
| // abstract class C4 with G<RR> {} // Ok. |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| typedef R = core::Record; |
| typedef RR = core::Record; |
| class G<X extends core::Object? = dynamic> extends core::Object { |
| synthetic constructor •() → self::G<self::G::X%> |
| : super core::Object::•() |
| ; |
| } |
| abstract class A1 extends core::Record { |
| synthetic constructor •() → self::A1 |
| : super core::Record::•() |
| ; |
| } |
| abstract class A2 extends core::Record { |
| synthetic constructor •() → self::A2 |
| : super core::Record::•() |
| ; |
| } |
| abstract class A3 extends self::G<core::Record> { |
| synthetic constructor •() → self::A3 |
| : super self::G::•() |
| ; |
| } |
| abstract class A4 extends self::G<core::Record> { |
| synthetic constructor •() → self::A4 |
| : super self::G::•() |
| ; |
| } |
| abstract class B1 extends core::Object implements core::Record { |
| synthetic constructor •() → self::B1 |
| : super core::Object::•() |
| ; |
| } |
| abstract class B2 extends core::Object implements core::Record { |
| synthetic constructor •() → self::B2 |
| : super core::Object::•() |
| ; |
| } |
| abstract class B3 extends core::Object implements self::G<core::Record> { |
| synthetic constructor •() → self::B3 |
| : super core::Object::•() |
| ; |
| } |
| abstract class B4 extends core::Object implements self::G<core::Record> { |
| synthetic constructor •() → self::B4 |
| : super core::Object::•() |
| ; |
| } |
| abstract final class _C1&Object&Record = core::Object with core::Record /*isAnonymousMixin,hasConstConstructor*/ { |
| const synthetic constructor •() → self::_C1&Object&Record |
| : super core::Object::•() |
| ; |
| abstract mixin-stub get runtimeType() → core::Type; -> core::Record::runtimeType |
| abstract mixin-stub get hashCode() → core::int; -> core::Record::hashCode |
| abstract mixin-stub operator ==(core::Object other) → core::bool; -> core::Record::== |
| abstract mixin-stub method toString() → core::String; -> core::Record::toString |
| } |
| abstract class C1 extends self::_C1&Object&Record { |
| synthetic constructor •() → self::C1 |
| : super self::_C1&Object&Record::•() |
| ; |
| } |
| abstract final class _C2&Object&RR = core::Object with core::Record /*isAnonymousMixin,hasConstConstructor*/ { |
| const synthetic constructor •() → self::_C2&Object&RR |
| : super core::Object::•() |
| ; |
| abstract mixin-stub get runtimeType() → core::Type; -> core::Record::runtimeType |
| abstract mixin-stub get hashCode() → core::int; -> core::Record::hashCode |
| abstract mixin-stub operator ==(core::Object other) → core::bool; -> core::Record::== |
| abstract mixin-stub method toString() → core::String; -> core::Record::toString |
| } |
| abstract class C2 extends self::_C2&Object&RR { |
| synthetic constructor •() → self::C2 |
| : super self::_C2&Object&RR::•() |
| ; |
| } |
| abstract class _C3&Object&G = core::Object with self::G<core::Record> /*isAnonymousMixin,hasConstConstructor*/ { |
| const synthetic constructor •() → self::_C3&Object&G |
| : super core::Object::•() |
| ; |
| } |
| abstract class C3 extends self::_C3&Object&G { |
| synthetic constructor •() → self::C3 |
| : super self::_C3&Object&G::•() |
| ; |
| } |
| abstract class _C4&Object&G = core::Object with self::G<core::Record> /*isAnonymousMixin,hasConstConstructor*/ { |
| const synthetic constructor •() → self::_C4&Object&G |
| : super core::Object::•() |
| ; |
| } |
| abstract class C4 extends self::_C4&Object&G { |
| synthetic constructor •() → self::C4 |
| : super self::_C4&Object&G::•() |
| ; |
| } |
| static method main() → dynamic {} |