Skip to content

Commit

Permalink
Move all modifiers to the same level
Browse files Browse the repository at this point in the history
  • Loading branch information
soc committed Mar 19, 2015
1 parent dfe66d4 commit 96d1763
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions spec/05-classes-and-objects.md
Expand Up @@ -526,7 +526,7 @@ case the member is called _qualified private_.
Class-private or object-private members may not be abstract, and may
not have `protected` or `override` modifiers.

#### `protected`
### `protected`
The `protected` modifier applies to class member definitions.
Protected members of a class can be accessed from within
- the template of the defining class,
Expand Down Expand Up @@ -557,14 +557,14 @@ legal if the prefix is `this` or `$O$.this`, for some
class $O$ enclosing the reference. In addition, the restrictions for
unqualified `protected` apply.

#### `override`
### `override`
The `override` modifier applies to class member definitions or declarations.
It is mandatory for member definitions or declarations that override some
other concrete member definition in a parent class. If an `override`
modifier is given, there must be at least one overridden member
definition or declaration (either concrete or abstract).

#### `abstract override`
### `abstract override`
The `override` modifier has an additional significance when
combined with the `abstract` modifier. That modifier combination
is only allowed for value members of traits.
Expand All @@ -579,7 +579,7 @@ influence the concept whether a member is concrete or abstract. A
member is _abstract_ if only a declaration is given for it;
it is _concrete_ if a full definition is given.

#### `abstract`
### `abstract`
The `abstract` modifier is used in class definitions. It is
redundant for traits, and mandatory for all other classes which have
incomplete members. Abstract classes cannot be
Expand All @@ -592,7 +592,7 @@ The `abstract` modifier can also be used in conjunction with
`override` for class member definitions. In that case the
previous discussion applies.

#### `final`
### `final`
The `final` modifier applies to class member definitions and to
class definitions. A `final` class member definition may not be
overridden in subclasses. A `final` class may not be inherited by
Expand All @@ -604,13 +604,13 @@ 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`.

#### `sealed`
### `sealed`
The `sealed` modifier applies to class definitions. A
`sealed` class may not be directly inherited, except if the inheriting
template is defined in the same source file as the inherited class.
However, subclasses of a sealed class can be inherited anywhere.

#### `lazy`
### `lazy`
The `lazy` modifier applies to value definitions. A `lazy`
value is initialized the first time it is accessed (which might never
happen at all). Attempting to access a lazy value during its
Expand Down

0 comments on commit 96d1763

Please sign in to comment.