Skip to content

Commit 568333d

Browse files
authored
Remove the mixin modifiers no longer supported in the latest proposal. (#1196)
1 parent ec8c7e3 commit 568333d

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Hide `--fix` and related options in `--help`. The options are still there and
44
supported, but are no longer shown by default. Eventually, we would like all
55
users to move to using `dart fix` instead of `dart format --fix`.
6+
* Don't format `sealed`, `interface`, and `final` keywords on mixin
7+
declarations. The proposal was updated to no longer support them.
68

79
# 2.3.0
810

lib/src/source_visitor.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2215,9 +2215,6 @@ class SourceVisitor extends ThrowingAstVisitor {
22152215

22162216
builder.nestExpression();
22172217
modifier(node.baseKeyword);
2218-
modifier(node.interfaceKeyword);
2219-
modifier(node.finalKeyword);
2220-
modifier(node.sealedKeyword);
22212218
token(node.mixinKeyword);
22222219
space();
22232220
token(node.name);

test/whitespace/metadata.unit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,11 @@ enum Foo {
444444
<<<
445445
@meta
446446
mixin M {}
447+
>>> metadata on mixin
448+
@meta base mixin M {}
449+
<<<
450+
@meta
451+
base mixin M {}
447452
>>> metadata on extension
448453
@meta extension A on B {}
449454
<<<

test/whitespace/mixins.unit

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,7 @@ mixin M1 on UnaryNum {
2525
mixin M< A ,B >on C implements D{ }
2626
<<<
2727
mixin M<A, B> on C implements D {}
28-
>>> mixin modifiers
29-
mixin M1 {}
30-
base mixin M2 {}
31-
interface mixin M3 {}
32-
final mixin M4 {}
33-
sealed mixin M5 {}
28+
>>> base modifier
29+
base mixin M {}
3430
<<<
35-
mixin M1 {}
36-
base mixin M2 {}
37-
interface mixin M3 {}
38-
final mixin M4 {}
39-
sealed mixin M5 {}
31+
base mixin M {}

0 commit comments

Comments
 (0)