summaryrefslogtreecommitdiff
path: root/05-types.md
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2014-03-10 17:31:12 -0700
committerAdriaan Moors <adriaan.moors@typesafe.com>2014-03-10 19:20:05 -0700
commit90314673008a3bf765cf72d8cbbd3c691f27af03 (patch)
tree650cc5babe9101eb4d6e814875c43555783787e6 /05-types.md
parent21ca2cf9d8e39274934f2dca79c8ee8eda024ae3 (diff)
downloadscala-90314673008a3bf765cf72d8cbbd3c691f27af03.tar.gz
scala-90314673008a3bf765cf72d8cbbd3c691f27af03.tar.bz2
scala-90314673008a3bf765cf72d8cbbd3c691f27af03.zip
Catch up with latex spec.
Diffstat (limited to '05-types.md')
-rw-r--r--05-types.md34
1 files changed, 34 insertions, 0 deletions
diff --git a/05-types.md b/05-types.md
index 9dd5ed9690..25210294ea 100644
--- a/05-types.md
+++ b/05-types.md
@@ -637,6 +637,40 @@ the corresponding type parameter clause.
`newType` type constructor parameter in `flatMap`.
+<!-- ### Overloaded Types
+
+More than one values or methods are defined in the same scope with the
+same name, we model
+
+An overloaded type consisting of type alternatives $T_1 \commadots T_n (n \geq 2)$ is denoted internally $T_1 \overload \ldots \overload T_n$.
+
+(@) The definitions
+```
+def println: Unit
+def println(s: String): Unit = $\ldots$
+def println(x: Float): Unit = $\ldots$
+def println(x: Float, width: Int): Unit = $\ldots$
+def println[A](x: A)(tostring: A => String): Unit = $\ldots$
+```
+define a single function `println` which has an overloaded
+type.
+```
+println: => Unit $\overload$
+ (String) Unit $\overload$
+ (Float) Unit $\overload$
+ (Float, Int) Unit $\overload$
+ [A] (A) (A => String) Unit
+```
+
+(@) The definitions
+```
+def f(x: T): T = $\ldots$
+val f = 0
+```
+define a function `f} which has type `(x: T)T $\overload$ Int`.
+-->
+
+
## Base Types and Member Definitions
Types of class members depend on the way the members are referenced.