From a6dccebef268ace8151f38b3bac4a5b03f891d4c Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Tue, 24 Jan 2017 10:15:54 -0800 Subject: SI-9464 Clarify spec on no final trait Without being too finicky with syntax, say that `final abstract class` is OK (even as a nested class, where it would be an incomplete member) but not `final trait`. Such a class might be a standard lib primitive, or might be an implicit value that is only a ludicrous marker and, if present, need only have the null value. --- spec/05-classes-and-objects.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'spec') diff --git a/spec/05-classes-and-objects.md b/spec/05-classes-and-objects.md index 75620f57d4..86f1b6c4b0 100644 --- a/spec/05-classes-and-objects.md +++ b/spec/05-classes-and-objects.md @@ -597,10 +597,12 @@ overridden in subclasses. A `final` class may not be inherited by a template. `final` is redundant for object definitions. Members of final classes or objects are implicitly also final, so the `final` modifier is generally redundant for them, too. Note, however, that -[constant value definitions](04-basic-declarations-and-definitions.html#value-declarations-and-definitions) do require -an explicit `final` modifier, even if they are defined in a final class or -object. `final` may not be applied to incomplete members, and it may not be -combined in one modifier list with `sealed`. +[constant value definitions](04-basic-declarations-and-definitions.html#value-declarations-and-definitions) +do require an explicit `final` modifier, +even if they are defined in a final class or object. +`final` is permitted for abstract classes +but it may not be applied to traits or incomplete members, +and it may not be combined in one modifier list with `sealed`. ### `sealed` The `sealed` modifier applies to class definitions. A -- cgit v1.2.3