Also deprecate backing field symbols.#8122
Merged
SethTisue merged 1 commit intoscala:2.12.xfrom Jun 18, 2019
Merged
Conversation
Compiling
@deprecated val foo: T = some.deprecated(call)
yielded
private[this] val `foo `: T = some.deprecated(call)
@deprecated <accessor> def foo: T = this.`foo `
where the `@deprecated` has been slapped on the def (where it'll incur
deprecation warnings on callers) but not on the val (where it'll
suppress deprecation warnings on the body.
Just copy the annotation across.
Fixes scala/bug#11538 in an expedient manner.
Contributor
Author
|
Thanks @dwijnand. I accidentally pushed to the wrong repo and had to recreate it, and you know how airports and rushing around make it hard to pay attention to details. |
diesalbla
approved these changes
Jun 5, 2019
som-snytt
approved these changes
Jun 5, 2019
Contributor
som-snytt
left a comment
There was a problem hiding this comment.
Isn't that convenient. Thanks!
Contributor
Author
|
It's my first one-liner in a while, which gives me fear that it isn't the right solution. If it breaks, though, it'll only break 2.12.9, not 2.13.0, thereby encouraging people to migrate. |
Contributor
|
Excellent! Always thinking ahead! Or behind, in this case. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Compiling
yielded
where the
@deprecatedhas been slapped on the def (where it'll incur deprecation warnings on callers) but not on the val (where it'll suppress deprecation warnings on the body).Just copy the annotation across.
Fixes scala/bug#11538 in an expedient manner.
I hope this works.