Skip to content

Commit fef6eac

Browse files
authored
Merge pull request #3470 from Bolpat/patch-11
`extern(C++)` classes have no base class unless specified Signed-off-by: Nicholas Wilson <[email protected]> Merged-on-behalf-of: Nicholas Wilson <[email protected]>
2 parents d46a510 + 85d72a2 commit fef6eac

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spec/expression.dd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1796,8 +1796,10 @@ $(H3 $(LNAME2 super, super))
17961796
$(P $(D super) is identical to $(D this), except that it is
17971797
cast to $(D this)'s base class.
17981798
It is an error if there is no base class.
1799-
It is an error to use the $(D super) reference outside a non-static class member function.
1800-
(Only class $(D Object) has no base class.)
1799+
It is an error to use the $(D super) reference outside a non-static class member function,
1800+
or inside a member function of a class without a base class.
1801+
(The only `extern(D)` class without a base class is `Object`,
1802+
however, note that `extern(C++)` classes have no base class unless specified.)
18011803
If a member function is called with an explicit reference
18021804
to $(D super), a non-virtual call is made.
18031805
)

0 commit comments

Comments
 (0)