Skip to content

Extends syntax inconsistent #902

Closed
Closed
@scabug

Description

@scabug

In the syntax summary of the Scala Specification (as of May 5th, 2008), the syntax for subclassing is given as:

ClassTemplateOpt ::= Extends ClassTemplate | [[Extends] TemplateBody]
TraitTemplateOpt ::= Extends TraitTemplate | [[Extends] TemplateBody]
Extends          ::= `extends' | `<:'

However, the alternative <: token doesn't seem to be supported by the compiler. Moreover, the Extends non-terminal is not mentioned elsewhere in the specification, and in 5.3 we have

ClassTemplateOpt ::= `extends' ClassTemplate | [[`extends'] TemplateBody]
TraitTemplateOpt ::= `extends' TraitTemplate | [[`extends'] TemplateBody]

Hence the syntax summary seems to be erroneous.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions