aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/i1756.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos/i1756.scala')
-rw-r--r--tests/pos/i1756.scala20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/pos/i1756.scala b/tests/pos/i1756.scala
new file mode 100644
index 000000000..e6f6eda60
--- /dev/null
+++ b/tests/pos/i1756.scala
@@ -0,0 +1,20 @@
+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})
+}
+