-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Tailrec jammed by safer exceptions #17147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
/cc @odersky |
This seems like a reasonably simple issue. Maybe it's good for the issue spree? |
Seems plausible to me too. Let's label it and if anyone disagrees they can remove it. |
This issue was picked for the Issue Spree No. 29 of 18 April 2023 which takes place in a week from now. @bishabosha, @Linyxus, @colin4124, @nmcb will be working on it. If you have any insight into the issue or guidance on how to fix it, please leave it here. |
it broke between |
most likely it seems that #16507 cause the issue |
minimisation found by @Linyxus object TestyFactorial:
import scala.annotation.tailrec
import language.experimental.erasedDefinitions
erased class Foo1
class Foo2
@tailrec
final def test1(n: Int, acc: Int): Foo1 ?=> Int =
if n <= 0 then acc
else test1(n - 1, acc * n)
@tailrec
final def test2(n: Int, acc: Int): Foo2 ?=> Int =
if n <= 0 then acc
else test2(n - 1, acc * n) |
It seems the problem is with erasure, as I noted in #16507 (comment), before the change, the erasure of This seems to involve two factors |
- also add test from scala#17147
Compiler version
Minimized code
Output
The text was updated successfully, but these errors were encountered: