Skip to content

No warning when recursively initializing value #18637

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

Closed
LightSystem opened this issue Oct 2, 2023 · 2 comments
Closed

No warning when recursively initializing value #18637

LightSystem opened this issue Oct 2, 2023 · 2 comments
Labels
stat:needs triage Every issue needs to have an "area" and "itype" label

Comments

@LightSystem
Copy link

Compiler version

3.3.1

Minimized example

val test: String = test

Output

val test: String = null

Expectation

The compiler should give a warning by default. For example in Scala 2.13 this results in: warning: value test does nothing other than call itself recursively.

@LightSystem LightSystem added the stat:needs triage Every issue needs to have an "area" and "itype" label label Oct 2, 2023
@LightSystem
Copy link
Author

@som-snytt
Copy link
Contributor

Originally posted in #14429

@som-snytt som-snytt closed this as not planned Won't fix, can't repro, duplicate, stale Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:needs triage Every issue needs to have an "area" and "itype" label
Projects
None yet
Development

No branches or pull requests

2 participants