Details
-
Sub-task
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.5.0
Description
[warn] /Users/yangjie01/SourceCode/git/spark-mine-sbt/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/JavaTypeInferenceSuite.scala:74:21: [deprecation @ | origin= | version=2.13.7] Wrap `enum` in backticks to use it as an identifier, it will become a keyword in Scala 3. [warn] @BeanProperty var enum: java.time.Month = _
enum will become a keyword in Scala 3, this also includes export and given.
Scala 2.13
Welcome to Scala 2.13.12 (OpenJDK 64-Bit Server VM, Java 17.0.8). Type in expressions for evaluation. Or try :help. scala> val enum: Int = 1 ^ warning: Wrap `enum` in backticks to use it as an identifier, it will become a keyword in Scala 3. [quickfixable] val enum: Int = 1 scala> val export: Int = 1 ^ warning: Wrap `export` in backticks to use it as an identifier, it will become a keyword in Scala 3. [quickfixable] val export: Int = 1 scala> val given: Int = 1 ^ warning: Wrap `given` in backticks to use it as an identifier, it will become a keyword in Scala 3. [quickfixable] val given: Int = 1
Scala 3
Welcome to Scala 3.3.1 (17.0.8, Java OpenJDK 64-Bit Server VM). Type in expressions for evaluation. Or try :help. scala> val enum: Int = 1 -- [E032] Syntax Error: -------------------------------------------------------- 1 |val enum: Int = 1 | ^^^^ | pattern expected | | longer explanation available when compiling with `-explain` scala> val export: Int = 1 -- [E032] Syntax Error: -------------------------------------------------------- 1 |val export: Int = 1 | ^^^^^^ | pattern expected | | longer explanation available when compiling with `-explain` scala> val given: Int = 1 -- [E040] Syntax Error: -------------------------------------------------------- 1 |val given: Int = 1 | ^ | an identifier expected, but ':' found | | longer explanation available when compiling with `-explain`
Attachments
Attachments
Issue Links
- links to