D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3571 - super description has a duplicated sentence
Summary: super description has a duplicated sentence
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: All All
: P2 trivial
Assignee: No Owner
URL: http://www.digitalmars.com/d/1.0/expr...
Keywords: spec
Depends on:
Blocks:
 
Reported: 2009-12-03 18:48 UTC by Leandro Lucarella
Modified: 2014-04-18 09:12 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Leandro Lucarella 2009-12-03 18:48:51 UTC
This is what the specs says about the super expression:

  super

  super is identical to this, except that it is cast to this's base class. It is
  an error if there is no base class. It is an error to use super within a struct
  member function. (Only class Object has no base class.) super is not allowed in
  struct member functions. If a member function is called with an explicit
  reference to super, a non-virtual call is made.

Note that using super in structs is forbidden is said twice (once before the clarification in parenthesis, and one after). Maybe this can be rephrased as:

  super

  super is identical to this, except that it is cast to this's base class. It is
  an error if there is no base class (note that only class Object has no base
  class). It is an error to use super within a struct member function. If a
  member function is called with an explicit reference to super, a non-virtual
  call is made.

This goes for D2 too.
Comment 1 Walter Bright 2009-12-06 01:12:26 UTC
Fixed
Comment 2 Leandro Lucarella 2009-12-08 13:29:13 UTC
http://www.dsource.org/projects/phobos/changeset/1365