Skip to content

Commit 8a89491

Browse files
authored
Make classes without base class explicit
1 parent d6fb5ac commit 8a89491

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spec/expression.dd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1674,7 +1674,10 @@ $(H3 $(LNAME2 super, super))
16741674
$(P $(D super) is identical to $(D this), except that it is
16751675
cast to $(D this)'s base class.
16761676
It is an error if there is no base class.
1677-
It is an error to use the $(D super) reference outside a non-static class member function.
1677+
It is an error to use the $(D super) reference outside a non-static class member function,
1678+
or inside a member function of a class without a base class.
1679+
(The only `extern(D)` class without a base class is `Object`,
1680+
however, note that `extern(C++)` classes have no base class unless specified.)
16781681
If a member function is called with an explicit reference
16791682
to $(D super), a non-virtual call is made.
16801683
)

0 commit comments

Comments
 (0)