Skip to content

Deprecate private[this], protected[this] #18863

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

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

Deprecate private[this], protected[this] #18863

nicolasstucki opened this issue Nov 7, 2023 · 2 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 8, 2023
This is the first part of  #18863

* In `3.4` we emit the deprecation warning and enable the patch with
-rewrite.
* In `future` we emit we make this syntax an error

```scala
//> using options -source future
private[this] def foo: Int = ??? // error
```
```diff
//> using options -rewrite -source 3.4-migration
- private[this] def foo: Int = ???
+ private def foo: Int = ???
```
@ByteEater-pl
Copy link

ByteEater-pl commented Mar 2, 2024

Why are they being deprecated?

@bishabosha
Copy link
Member

Why are they being deprecated?

They are inferred automatically based on usage

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

3 participants