www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13943] New: Grammar does not list 'super' and 'this' as types


          Issue ID: 13943
           Summary: Grammar does not list 'super' and 'this' as types
           Product: D
           Version: D2
          Hardware: All
               URL: http://dlang.org/grammar.html#AliasDeclaration
                OS: All
            Status: NEW
          Keywords: spec
          Severity: normal
          Priority: P1
         Component: websites
          Assignee: nobody puremagic.com
          Reporter: briancschott gmail.com
            Blocks: 10233

Relevant issues:


DMD accepts 'this' and 'super', but this behavior is undocumented. An example
of where this causes problems:

class A { void send() {} }
class B : A { send = super.send; }

The grammar doesn't allow 'super' to appear in AliasDeclarationX or BasicType,
but DMD's parse.c does look for 'super' and 'this' in Parser::parseBasicType()

Jan 05 2015