aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-12-02 08:53:04 +0100
committerMartin Odersky <odersky@gmail.com>2016-12-02 08:53:11 +0100
commitdbb0279a788d606892b123aa3baaa94614d676ff (patch)
tree085251d1a9c96685d73718a57942ff4fb9d45226 /tests
parent47d208448e614125446c7f294f8231c3fb7108d6 (diff)
downloaddotty-dbb0279a788d606892b123aa3baaa94614d676ff.tar.gz
dotty-dbb0279a788d606892b123aa3baaa94614d676ff.tar.bz2
dotty-dbb0279a788d606892b123aa3baaa94614d676ff.zip
Fix-1756: Use lexically enclosing class as start of outer path.
We confused the enclosing class (which skips the current class in super call contexts) and the lexically enclosing class in three locations that all had to do with the start of an outer path.
Diffstat (limited to 'tests')
-rw-r--r--tests/pos/i1756.scala21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/pos/i1756.scala b/tests/pos/i1756.scala
new file mode 100644
index 000000000..17c313d28
--- /dev/null
+++ b/tests/pos/i1756.scala
@@ -0,0 +1,21 @@
+/*
+ * class A { { val x = this } }
+class B(x: Int) {
+ class C(x: Int)
+ extends B({
+ val test = this
+ x
+ }) {
+ def this() = {
+ this({
+ 1
+ })
+ }
+ }
+}
+*/
+// Minimized version
+class D(x: Int) {
+ class E(x: Int) extends D({val test = D.this; x})
+}
+