-
Notifications
You must be signed in to change notification settings - Fork 3.1k
SI-7605 Deprecate procedure syntax #3076
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
This commit covers three cases:
- constructor definitions (def this {...})
- concrete method definitions (def foo {...})
- abstract method declarations (def foo)
The deprecation is currently hidden behind -Xfuture pending IDE support
for migrating users from procedures to methods.
|
Would it make sense to remove the use of procedure syntax in the compiler and library in the same PR (separate commit) or is the job too big for one pass? |
|
@JamesIry My plan was to first do the minimal thing to get the warning so that I can start looking into IDE support. So, yes, I could do it now manually, but I'd prefer using the IDE to verify that things work as expected. |
|
LGTM, but would like some comment from the reviewers or @adriaanm |
|
LGTM2 -- thanks, Simon! |
|
In this area, we should also deprecate implicit definitions without return type. They cause much more confusion (and supposed type checker slowdown) than it's worth (not to mention binary/behaviorally incompatible changes due to changes in type inference...) |
|
@adriaanm Is this good to go or was your comment about adding a deprecation for implicit defs targeted at this commit? |
|
this is good to go, just meant to say "while you're at it -- here's some more stuff I think we should deprecate" |
|
Thanks! |
SI-7605 Deprecate procedure syntax
Ref scala/bug#7605 scala#3076 deprecated the procedure syntax, but only under -Xfuture flag. This deprecates it without it, and drops it under -Xsource:2.14.
Ref scala/bug#7605 scala#3076 deprecated the procedure syntax, but only under -Xfuture flag. This deprecates it without it, and drops it under -Xsource:2.14.
Procedure syntax was deprecated under -Xfuture flag in scala#3076. This deprecates it unconditionally, and drops it under -Xsource:2.14. See scala/bug#7605
Procedure syntax was deprecated under -Xfuture flag in scala#3076. This deprecates it unconditionally, and drops it under -Xsource:2.14. See scala/bug#7605
Procedure syntax was deprecated under -Xfuture flag in scala#3076. This deprecates it unconditionally, and drops it under -Xsource:2.14. See scala/bug#7605
Procedure syntax was deprecated under -Xfuture flag in scala#3076. This deprecates it unconditionally, and drops it under -Xsource:2.14. See scala/bug#7605
Procedure syntax was deprecated under -Xfuture flag in scala#3076. This deprecates it unconditionally, and drops it under -Xsource:2.14. See scala/bug#7605
Procedure syntax was deprecated under -Xfuture flag in scala#3076. This deprecates it unconditionally, and drops it under -Xsource:2.14. See scala/bug#7605 To update the tests, this drops procedure syntax from test/ using ScalaFix ``` $ coursier launch ch.epfl.scala:scalafix-cli_2.12.3:0.5.3 -- -r ProcedureSyntax test $ coursier launch ch.epfl.scala:scalafix-cli_2.12.4:0.5.10 -- -r ExplicitUnit test ```
This commit covers three cases:
The deprecation is currently hidden behind -Xfuture pending IDE support
for migrating users from procedures to methods.