aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/t7520.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/pos/t7520.scala')
-rw-r--r--tests/untried/pos/t7520.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/untried/pos/t7520.scala b/tests/untried/pos/t7520.scala
new file mode 100644
index 000000000..747f5278e
--- /dev/null
+++ b/tests/untried/pos/t7520.scala
@@ -0,0 +1,10 @@
+class A {
+ val x: Singleton with this.type = this
+ val y: this.type = x
+}
+
+class B {
+ val x = ""
+ val xs: x.type with Singleton = x
+ val y: x.type = xs
+}