Skip to content
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

Deprecate var x: T = _ syntax, must use var x: T = uninitialized instead. #18861

Open
nicolasstucki opened this issue Nov 7, 2023 · 0 comments

Comments

@nicolasstucki
Copy link
Contributor

nicolasstucki commented Nov 7, 2023

Warn in: 3.4
Error in: TBD

nicolasstucki added a commit that referenced this issue Nov 10, 2023
First part #18861

* In `3.4` we emit the deprecation warning
* In `future` we emit we make this syntax an error
* Add patch. Not ideal because we need to use the full path of
`uninitialized`

```scala
//> using options -source future
var x: Int = _ // error
```
```diff
//> using options -rewrite -source 3.4-migration
- var x: Int = _
+ var x: Int = scala.compiletime.uninitialized
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant