Files
sdk/pkg/front_end/parser_testcases/inline_class/extends_with.dart
T
Johnni Winther b1594fa130 [parser] Handle invalid extension type header in error recovery
This expands the existing recovery for class headers to handle
invalid, out-of-order, and duplicate clauses in extension type
declaration headers.

Change-Id: I7b33b91cc718e4c0673137121b8d083fa0ef1562
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321900
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-08-24 11:20:18 +00:00

24 lines
1.3 KiB
Dart

extension type ET1(int i) extends Foo {}
extension type ET2(int i) with Foo {}
extension type ET3(int i) with Foo, Bar {}
extension type ET4(int i) extends Foo with Bar {}
extension type ET5(int i) extends Foo with Bar, Baz {}
extension type ET6(int i) extends Foo implements Bar {}
extension type ET7(int i) with Foo implements Bar {}
extension type ET8(int i) with Foo, Bar implements Baz {}
extension type ET9(int i) extends Foo with Bar implements Baz {}
extension type ET10(int i) extends Foo with Bar, Baz implements Boz {}
extension type ET11(int i) implements Bar extends Foo {}
extension type ET12(int i) implements Bar with Foo {}
extension type ET13(int i) implements Bar with Foo, Bar {}
extension type ET14(int i) implements Bar extends Foo with Bar {}
extension type ET15(int i) implements Bar extends Foo with Bar, Baz {}
extension type ET16(int i) implements Bar extends Foo implements Bar {}
extension type ET17(int i) implements Bar with Foo implements Bar {}
extension type ET18(int i) implements Bar with Foo, Bar implements Baz {}
extension type ET19(int i) implements Bar extends Foo with Bar implements Baz {}
extension type ET20(int i) implements Bar extends Foo with Bar, Baz implements Boz {}
extension type ET21(int i) implements Bar implements Boz {}
extension type ET22(int i) extends Bar extends Boz {}
extension type ET23(int i) extends Bar, Boz {}