aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/tailcall
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-07-14 13:17:34 +0200
committerMartin Odersky <odersky@gmail.com>2014-07-17 11:02:03 +0200
commitace968dabf8e02f725f7b77cde90f64988a7b326 (patch)
tree10b4bd92cf02a5a391296f32a51ce3d5ff0d3164 /tests/pos/tailcall
parent57d69f8f4d00bef8cbb51d498b5139ca649a8ca6 (diff)
downloaddotty-ace968dabf8e02f725f7b77cde90f64988a7b326.tar.gz
dotty-ace968dabf8e02f725f7b77cde90f64988a7b326.tar.bz2
dotty-ace968dabf8e02f725f7b77cde90f64988a7b326.zip
Fix to rewire types
t6574 has a new test where we produce identical code in an if-then-else. This broke the rewiring logic before, and is fixed now. Also, more comments and test cases.
Diffstat (limited to 'tests/pos/tailcall')
-rw-r--r--tests/pos/tailcall/t6574.scala8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/pos/tailcall/t6574.scala b/tests/pos/tailcall/t6574.scala
index cd0fdbb8d..d8377ddbc 100644
--- a/tests/pos/tailcall/t6574.scala
+++ b/tests/pos/tailcall/t6574.scala
@@ -4,8 +4,12 @@ class Bad[X, Y](val v: Int) extends AnyVal {
this.foo[Z](a)(b)
}
- @annotation.tailrec final def differentReceiver : Unit = {
- {(); new Bad[X, Y](0)}.differentReceiver
+ @annotation.tailrec final def differentReceiver : Unit =
+ {(); new Bad[X, Y](0)}.differentReceiver
+
+ @annotation.tailrec final def differentReceiver2 : Unit = {
+ if (true) {(); new Bad[X, Y](0)}.differentReceiver2
+ else {(); new Bad[X, Y](0)}.differentReceiver2
}
@annotation.tailrec final def dependent[Z](a: Int)(b: String): b.type = {