diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-07-22 13:55:10 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-07-22 14:06:01 +0200 |
commit | 601b11eb5c8c43304f83310d66fe7943fc1cb0a5 (patch) | |
tree | f17d3dd6cfda8b273d0a91931ae0939901e881bd /tests/pos | |
parent | b4e7de00d7a1c940682592c0105e81352746fbf0 (diff) | |
download | dotty-601b11eb5c8c43304f83310d66fe7943fc1cb0a5.tar.gz dotty-601b11eb5c8c43304f83310d66fe7943fc1cb0a5.tar.bz2 dotty-601b11eb5c8c43304f83310d66fe7943fc1cb0a5.zip |
Add test for tailcall
Test for order of type parameters in recursive call
Diffstat (limited to 'tests/pos')
-rw-r--r-- | tests/pos/tailcall/tailcall.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/pos/tailcall/tailcall.scala b/tests/pos/tailcall/tailcall.scala index 9cf373cf0..1e05840ea 100644 --- a/tests/pos/tailcall/tailcall.scala +++ b/tests/pos/tailcall/tailcall.scala @@ -3,3 +3,7 @@ class tailcall { final def fact(x: Int, acc: Int = 1): Int = if (x == 0) acc else fact(x - shift, acc * x) def id[T <: AnyRef](x: T): T = if (x eq null) x else id(x) } + +class TypedApply[T2]{ + private def firstDiff[T <: TypedApply[T2]](xs: List[T]): Int = firstDiff(xs) +}
\ No newline at end of file |