aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/i864.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-02-05 11:03:12 +0100
committerMartin Odersky <odersky@gmail.com>2016-02-05 11:03:12 +0100
commitc24ece505e53570566b499b817342a4dfa4087ff (patch)
tree28b75004bd1568b8e80ca1410e58d15b52d7f092 /tests/pos/i864.scala
parent9d8c92d1d52fcfa95d57ce88d91dbb84c8ecfbd1 (diff)
downloaddotty-c24ece505e53570566b499b817342a4dfa4087ff.tar.gz
dotty-c24ece505e53570566b499b817342a4dfa4087ff.tar.bz2
dotty-c24ece505e53570566b499b817342a4dfa4087ff.zip
Prune constraints that could turn into cycles
Fixes #864. Review by @smarter.
Diffstat (limited to 'tests/pos/i864.scala')
-rw-r--r--tests/pos/i864.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/pos/i864.scala b/tests/pos/i864.scala
new file mode 100644
index 000000000..8d2b85999
--- /dev/null
+++ b/tests/pos/i864.scala
@@ -0,0 +1,10 @@
+object C {
+ val a: Int = 1
+ val b: Int = 2
+ val c: Int = 2
+
+ trait X[T]
+ implicit def u[A, B]: X[A | B] = new X[A | B] {}
+ def y[T](implicit x: X[T]): T = ???
+ val x: a.type & b.type | b.type & c.type = y
+}