summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2014-03-25 16:35:37 -0700
committerAdriaan Moors <adriaan.moors@typesafe.com>2014-03-25 16:35:37 -0700
commita1275c4cb6fbc7483c0064a072f8cb3dbf7193d4 (patch)
tree3337ce3be34836b770b78ea486b06a79f3148f7e
parentc61f554acd65885cedee8ebae2bfaf2c9d70275a (diff)
downloadscala-a1275c4cb6fbc7483c0064a072f8cb3dbf7193d4.tar.gz
scala-a1275c4cb6fbc7483c0064a072f8cb3dbf7193d4.tar.bz2
scala-a1275c4cb6fbc7483c0064a072f8cb3dbf7193d4.zip
TODO: binding example
-rw-r--r--04-identifiers-names-and-scopes.md9
1 files changed, 6 insertions, 3 deletions
diff --git a/04-identifiers-names-and-scopes.md b/04-identifiers-names-and-scopes.md
index 57af8afc3e..3086525634 100644
--- a/04-identifiers-names-and-scopes.md
+++ b/04-identifiers-names-and-scopes.md
@@ -34,18 +34,21 @@ in some inner scope _shadows_ bindings of lower precedence in the
same scope as well as bindings of the same or lower precedence in outer
scopes.
+<!-- TODO: either the example, the spec, or the compiler is wrong
+
Note that shadowing is only a partial order. In a situation like
```
-val x = 1;
+val x = 1
{
- import p.x;
+ import p.x
x
}
```
neither binding of `x` shadows the other. Consequently, the
-reference to `x` in the third line above would be ambiguous.
+reference to `x` in the last line of the block above would be ambiguous.
+-->
A reference to an unqualified (type- or term-) identifier $x$ is bound
by the unique binding, which