Skip to content

Commit

Permalink
Add clarification for abstract function bodies.
Browse files Browse the repository at this point in the history
I find it clearer to explicitly state that `abstract int foo() { return 0; }` renders the encompassing class un-instantiatable, even though all function bodies are available.
  • Loading branch information
JohanEngelen committed Feb 10, 2016
1 parent a34cd8e commit a1d39fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/attribute.dd
Expand Up @@ -698,7 +698,9 @@ $(P
$(P
Functions declared as abstract can still have function
bodies. This is so that even though they must be overridden,
they can still provide $(SINGLEQUOTE base class functionality.)
they can still provide $(SINGLEQUOTE base class functionality),
e.g. through $(D super.foo()) in a derived class.
Note that the class is still abstract and cannot be instantiated directly.
)

$(SECTION3 $(LNAME2 uda, User Defined Attributes),
Expand Down

0 comments on commit a1d39fc

Please sign in to comment.