diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-01-26 13:53:07 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-02-03 15:10:02 +0100 |
commit | a14af3e7bf82e793d0b687bf6e53b6bc61f1ec5a (patch) | |
tree | 88f15fc5ad688a4f767db9f4122f172c3d040b6c /tests/pos | |
parent | 4ecc6dd2d10a295cb8a31776fc9304aaff712576 (diff) | |
download | dotty-a14af3e7bf82e793d0b687bf6e53b6bc61f1ec5a.tar.gz dotty-a14af3e7bf82e793d0b687bf6e53b6bc61f1ec5a.tar.bz2 dotty-a14af3e7bf82e793d0b687bf6e53b6bc61f1ec5a.zip |
Fix i321, tail call needs to be careful with abstracting over class type arguments.
Or it could lead to Ycheck error that was triggered in #321.
Diffstat (limited to 'tests/pos')
-rw-r--r-- | tests/pos/tailcall/i321.scala | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/pos/tailcall/i321.scala b/tests/pos/tailcall/i321.scala new file mode 100644 index 000000000..0d32dd625 --- /dev/null +++ b/tests/pos/tailcall/i321.scala @@ -0,0 +1,10 @@ +class i321[T >: Null <: AnyRef] { + + def mapconserve(f: T => Int): Int = { + def loop(pending: T): Int = { + val head1 = f(pending) + loop(pending) + } + loop(null) + } +}
\ No newline at end of file |