diff options
author | Martin Odersky <odersky@gmail.com> | 2016-12-02 08:53:04 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-12-02 08:53:11 +0100 |
commit | dbb0279a788d606892b123aa3baaa94614d676ff (patch) | |
tree | 085251d1a9c96685d73718a57942ff4fb9d45226 /tests/pos | |
parent | 47d208448e614125446c7f294f8231c3fb7108d6 (diff) | |
download | dotty-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/pos')
-rw-r--r-- | tests/pos/i1756.scala | 21 |
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}) +} + |