-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Remove deprecated warning in synthetic def #11055
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for opening this PR, I will link to this comment on why we need to be careful with ignoring synthetic defs which I see you already protect against some cases: #10996 (comment)
7b9505f
to
4526a80
Compare
@bishabosha I want to know some cases that we should warn in synthetic scope |
I mentioned some cases in #10996 (comment), as far as I can tell this PR has the same issues as #10996 and should be rejected for the same reason in favor of what I suggested in #10996 (comment) |
I checked these cases and got the following results: @deprecated("no CaseClass", "0.1") case class CaseClass(rgb: Int)
object Test {
abstract class TestX
val x = new TestX {
val obj = new CaseClass(5) // warn
}
val y = Option(5).map(new CaseClass(_)) // warn
val z = CaseClass(4) // not warn but seems not related with this PR
} But I agree that should not check synthetic flag only. |
@bishabosha @smarter Is it possible to check the
I think the user code must have a valid |
This is not a good solution because should disable not only |
Fixes #11022