summaryrefslogtreecommitdiff
path: root/doc/reference
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2003-08-15 10:25:51 +0000
committerMartin Odersky <odersky@gmail.com>2003-08-15 10:25:51 +0000
commit260757086149e48d2dbe955335ba959e874a6452 (patch)
tree57c5c0e150aabf04e57dff04a83170e22c7be9f2 /doc/reference
parent396a60a22c2724676071449d55aa9b29cd8c4322 (diff)
downloadscala-260757086149e48d2dbe955335ba959e874a6452.tar.gz
scala-260757086149e48d2dbe955335ba959e874a6452.tar.bz2
scala-260757086149e48d2dbe955335ba959e874a6452.zip
*** empty log message ***
Diffstat (limited to 'doc/reference')
-rw-r--r--doc/reference/reference.verb.tex14
1 files changed, 8 insertions, 6 deletions
diff --git a/doc/reference/reference.verb.tex b/doc/reference/reference.verb.tex
index 1a72c7d9d7..01d1440090 100644
--- a/doc/reference/reference.verb.tex
+++ b/doc/reference/reference.verb.tex
@@ -1243,8 +1243,10 @@ be omitted. If the lower bound \verb@L@ is missing, the bottom type
the top type \verb@scala.Any@ is assumed.
A {\em type alias} \verb@type t = T@ defines \verb@t@ to be an alias
-name for the type \verb@T@. Type declarations and type aliases are
-collectively called {\em type bindings}.
+name for the type \verb@T@. The left hand side of a type alias may
+have a type parameter clause, e.g. \verb@type t[tps] = T@. The scope
+of a type parameter extends over the right hand side \verb@T@ and the
+type parameter clause \verb@tps@ itself.
The scope rules for definitions (\sref{sec:defs}) and type parameters
(\sref{sec:funsigs}) make it possible that a type name appears in its
@@ -2498,17 +2500,17 @@ class Shape {
...
}
trait Bordered extends Shape {
- val thinkness: int
+ val thickness: int;
def equals(other: Any) = other match {
- case that: Bordered => this.thickness == that.thickness;
+ case that: Bordered => this.thickness == that.thickness
case _ => false
}
...
}
trait Colored extends Shape {
- val color: Color
+ val color: Color;
def equals(other: Any) = other match {
- case that: Colored => this.color == that.color;
+ case that: Colored => this.color == that.color
case _ => false
}
...