aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/t1131.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-08-24 18:04:22 +0200
committerMartin Odersky <odersky@gmail.com>2014-08-24 18:09:01 +0200
commitaa7a0399ad5424dd5292f2f1941c7293c16d6b79 (patch)
treefcc3efccc01f6d5160774c0b3998481f2d492500 /tests/pos/t1131.scala
parent70abd73e9306eca3ec4de1d98b877e4fafe66ad0 (diff)
downloaddotty-aa7a0399ad5424dd5292f2f1941c7293c16d6b79.tar.gz
dotty-aa7a0399ad5424dd5292f2f1941c7293c16d6b79.tar.bz2
dotty-aa7a0399ad5424dd5292f2f1941c7293c16d6b79.zip
Check that idents don't assume magic.
In TreeChecker, make sure that every identifier has a type with an elidable prefix. This excludes identifiers pointing to members of random prefixes without making the prefix explicit in the tree as part of a Select node.
Diffstat (limited to 'tests/pos/t1131.scala')
-rw-r--r--tests/pos/t1131.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/pos/t1131.scala b/tests/pos/t1131.scala
index 1b2a90457..740a36bdb 100644
--- a/tests/pos/t1131.scala
+++ b/tests/pos/t1131.scala
@@ -1,4 +1,8 @@
-trait A { self: Any { def p: Any } =>
+trait C {
+ def p: Any
+}
+
+trait A { self: C { def p: String } =>
def f(b: => Unit): Unit = {}
f { p }
}