aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/tailcall/t6574.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos/tailcall/t6574.scala')
-rw-r--r--tests/pos/tailcall/t6574.scala19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/pos/tailcall/t6574.scala b/tests/pos/tailcall/t6574.scala
new file mode 100644
index 000000000..cd0fdbb8d
--- /dev/null
+++ b/tests/pos/tailcall/t6574.scala
@@ -0,0 +1,19 @@
+class Bad[X, Y](val v: Int) extends AnyVal {
+ def vv = v
+ @annotation.tailrec final def foo[Z](a: Int)(b: String): Unit = {
+ this.foo[Z](a)(b)
+ }
+
+ @annotation.tailrec final def differentReceiver : Unit = {
+ {(); new Bad[X, Y](0)}.differentReceiver
+ }
+
+ @annotation.tailrec final def dependent[Z](a: Int)(b: String): b.type = {
+ this.dependent[Z](a)(b)
+ }
+}
+
+class HK[M[_]](val v: Int) extends AnyVal {
+ def hk[N[_]]: Unit = if (false) hk[M] else ()
+}
+