Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fast-track deprecating auto-application
Auto-application is dropped in Scala 3: https://dotty.epfl.ch/docs/reference/dropped-features/auto-apply.html So it must be deprecated in 2.13 first. Also, AFAICT Object_clone is Java-defined: $ qscala Welcome to Scala 2.13.2-20200325-150327-bc1cad4 (OpenJDK 64-Bit Server VM, Java 11.0.6). Type in expressions for evaluation. Or try :help. scala> :power Power mode enabled. :phase is at typer. import scala.tools.nsc._, intp.global._, definitions._ Try :help or completions for vals._ and power._ scala> Object_clone.isJavaDefined val res0: Boolean = true
- Loading branch information
Showing
126 changed files
with
513 additions
and
505 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Empty file.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
auto-application.scala:2: error: Int does not take parameters | ||
auto-application.scala:4: error: Int does not take parameters | ||
("": Any).##() | ||
^ | ||
auto-application.scala:3: error: Int does not take parameters | ||
auto-application.scala:5: error: Int does not take parameters | ||
("": AnyRef).##() | ||
^ | ||
auto-application.scala:4: error: Int does not take parameters | ||
auto-application.scala:6: error: Int does not take parameters | ||
("": Object).##() | ||
^ | ||
auto-application.scala:9: warning: Auto-application to `()` is deprecated. Supply the empty argument list `()` explicitly to invoke method meth, | ||
or remove the empty argument list from its definition (Java-defined methods are exempt). | ||
In Scala 3, an unapplied method like this will be eta-expanded into a function. | ||
meth // warn, auto-application (of nilary methods) is deprecated | ||
^ | ||
1 warning | ||
3 errors |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
// scalac: -deprecation -Werror | ||
|
||
class Test { | ||
("": Any).##() | ||
("": AnyRef).##() | ||
("": Object).##() | ||
|
||
def meth() = "" | ||
meth // warn, auto-application (of nilary methods) is deprecated | ||
} |
Oops, something went wrong.