Skip to content

Commit 0e1fcd6

Browse files
committed
Address comments
Fix grammatical cases.
1 parent 5b79277 commit 0e1fcd6

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

accepted/future-releases/class-modifiers/feature-specification.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -514,9 +514,7 @@ Many combinations don't make sense:
514514
* `sealed` types cannot be constructed so it's redundant to combine with
515515
`abstract`.
516516
* `sealed` types cannot be extended or implemented, so it's redundant to
517-
combine with `final`.
518-
* `sealed` types cannot be extended so it contradicts `base`.
519-
* `sealed` types cannot be implemented, so it contradicts `interface`.
517+
combine with `final`, `base`, or `interface`.
520518
* `sealed` types cannot be mixed in outside of their library, so it
521519
contradicts `mixin` on a class. *It's useful to allow `sealed` on a mixin
522520
declaration because the mixin can be applied within the same library.
@@ -849,11 +847,14 @@ intents.*
849847

850848
### Enum classes
851849

852-
The class introduced by an `enum` declaration is considered `final`.
850+
The class introduced by an `enum` declaration is considered `final` for any purpose
851+
where a class modifier is required.
853852

854-
Since the class cannot have any subclasses, the modifier does not prevent
855-
any otherwise allowed operation, and adding it ensures that the enum class
856-
satisfies any requirements introduced by its super-interfaces.
853+
The behavior of `enum` declarations is unchanged. Since an `enum` class cannot have
854+
any subclasses, the modifier would not prevent any otherwise allowed operation.
855+
The implicit `final` also does not imply fewer restrictions than `enum` declarations
856+
would otherwise have. The modifier is applied only to automatically satisfy any
857+
requirements introduced by super-interfaces.
857858

858859
### Anonymous mixin applications
859860

@@ -909,8 +910,8 @@ the anonymous class can mostly be ignored, since it satisfies all possible requi
909910
of its superclasses, while still propagating those requirements to its subclass.
910911
Treating the anonymous class as having these modifiers allows the algorithms
911912
used to check that restrictions are satisfied, and for the “reopen” lint described below,
912-
to treat the anonymouse mixin application class as any other class, without needing
913-
special cases.
913+
to treat the anonymous mixin application class as any other class, without needing
914+
special cases, and without adding any new restrictions..
914915

915916
### `@reopen` lint
916917

@@ -956,7 +957,7 @@ non-breaking.
956957
declarations in pre-feature libraries can ignore *some*
957958
`base`, `interface` and `final` modifiers on *some* declarations
958959
in platform libraries, and to mix in non-`mixin` classes from platform libraries,
959-
as long as those classes has `Object` as superclass and declares no constructors.
960+
as long as such a class has `Object` as superclass and declares no constructors.
960961
Instead, users will only have to abide by those restrictions
961962
when they upgrade their library's language version.
962963
_It will still not be possible to, e.g., extend or implement the `int` class,

0 commit comments

Comments
 (0)