-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Missing warning for Infinite recursive call in object #23277
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
It works as
It's normal to write a custom The check in Scala 2 warns for only the most trivial definition:
Actually, Scala 3 makes an effort now:
The check in tailrec could be more expansive or forgiving:
The usual observation is, "No one writes code like that, until they do." What does the A.I. say about it? |
ah, I see now, @som-snytt thank you for the reply so
compiles just fine while
warns about recursive call
|
The PR warns despite an assignment to |
Compiler version
3.7.0
reproduced also for nightly version (currently 3.7.2-RC1-bin-20250527-2703b6b-NIGHTLY)
Minimized code
Output
run of above code snippet leads to "lock" (execution is stuck)
Expectation
I expected to see at least compiler warning for such code
The text was updated successfully, but these errors were encountered: