Closed
Description
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.