aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-12-25 15:59:02 +0100
committerMartin Odersky <odersky@gmail.com>2013-12-25 15:59:11 +0100
commita19237f7be972870ca1c7477704a724419ef793f (patch)
tree39cfaa05657e5e83de45c94725510f533cb015bf /tests
parent7260b2607a4b0249f63bb75dac6143e902b91c66 (diff)
downloaddotty-a19237f7be972870ca1c7477704a724419ef793f.tar.gz
dotty-a19237f7be972870ca1c7477704a724419ef793f.tar.bz2
dotty-a19237f7be972870ca1c7477704a724419ef793f.zip
Making the name of self visible inside a class.
Previously, it wasn't.
Diffstat (limited to 'tests')
-rw-r--r--tests/pos/typers.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/pos/typers.scala b/tests/pos/typers.scala
index fd2cc9b74..dbbee3d74 100644
--- a/tests/pos/typers.scala
+++ b/tests/pos/typers.scala
@@ -76,6 +76,23 @@ object typers {
val b: B = new B
val y = b.x
+ val z: String = y
+
+ }
+
+ object Self {
+
+ class A(self: Int) { self =>
+
+ class B {
+ val b = self
+ val c: A = b
+ }
+
+ val a = self
+ val c: A = a
+ }
+
}