From 35f72d0a599e3aca2940e295052c0275c0a32533 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 6 Apr 2004 17:57:30 +0000 Subject: *** empty log message *** --- doc/reference/ReferencePart.tex | 7 ++++--- doc/reference/ReferencePartAppendix.tex | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'doc/reference') diff --git a/doc/reference/ReferencePart.tex b/doc/reference/ReferencePart.tex index 9bb914f8bb..f0bb1842a7 100644 --- a/doc/reference/ReferencePart.tex +++ b/doc/reference/ReferencePart.tex @@ -42,8 +42,8 @@ These sets are extended in the usual way to Unicode. \syntax\begin{lstlisting} op ::= special {special} -varid ::= lower {letter $|$ digit} [`_' [id]] -id ::= upper {letter $|$ digit} [`_' [id]] +varid ::= lower {letter $|$ digit} [`_' {digit} [id]] +id ::= upper {letter $|$ digit} [`_' {digit} [id]] | varid | op | ```string chars`'' @@ -2206,13 +2206,14 @@ A class definition which starts with the reserved word \code{trait} instead of \code{class} defines a trait. A trait is a specific instance of an abstract class, so the \code{abstract} modifier is redundant for it. The template of a trait must satisfy the following -three restrictions. +four restrictions. \begin{enumerate} \item All base classes of the trait are traits. \item All parent class constructors of a template must be primary constructors with empty value parameter lists. \item All non-empty statements in the template are either imports or pure definitions. +\item A trait may not have secondary constructors. \end{enumerate} A {\em pure} definition can be evaluated without any side effect. Function, type, class, or object definitions are always pure. A value diff --git a/doc/reference/ReferencePartAppendix.tex b/doc/reference/ReferencePartAppendix.tex index 2d1f48eb9e..085972f590 100644 --- a/doc/reference/ReferencePartAppendix.tex +++ b/doc/reference/ReferencePartAppendix.tex @@ -12,8 +12,8 @@ form. special ::= $\mbox{\rm\em ``all other characters except parentheses ([{}]) and periods''}$ op ::= special {special} - varid ::= lower {letter | digit} [`_' [id]] - id ::= upper {letter | digit} [`_' [id]] + varid ::= lower {letter | digit} [`_' {digit} [id]] + id ::= upper {letter | digit} [`_' {digit} [id]] | varid | op | `\'stringLit -- cgit v1.2.3