aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/compound.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-01-28 19:01:09 +0100
committerMartin Odersky <odersky@gmail.com>2015-01-28 19:03:55 +0100
commit70e55d26100199b99502705233786bbdc15c4c6b (patch)
tree97fbfa865286a60ad90230b868179c3e61143eec /tests/pos/compound.scala
parent37918e5d1eb53014b1116ea65381a56e93a3c855 (diff)
downloaddotty-70e55d26100199b99502705233786bbdc15c4c6b.tar.gz
dotty-70e55d26100199b99502705233786bbdc15c4c6b.tar.bz2
dotty-70e55d26100199b99502705233786bbdc15c4c6b.zip
Fixed problem with ensureSingleton
Need to also ensure that the singleton is stable. This makes compound.scala pass.
Diffstat (limited to 'tests/pos/compound.scala')
-rw-r--r--tests/pos/compound.scala14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/pos/compound.scala b/tests/pos/compound.scala
new file mode 100644
index 000000000..24a936f13
--- /dev/null
+++ b/tests/pos/compound.scala
@@ -0,0 +1,14 @@
+abstract class A { type T }
+
+abstract class B { val xz: Any }
+
+abstract class Test {
+ var yy: A with B { type T; val xz: T } = null;
+ var xx: A with B { type T; val xz: T } = null;
+ xx = yy;
+}
+
+abstract class Test2 {
+ var yy: A with B { type T; val xz: T } = null;
+ val xx: A with B { type T; val xz: T } = yy
+}