You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Yang Jie (Jira)" <ji...@apache.org> on 2023/10/26 05:19:00 UTC

[jira] [Assigned] (SPARK-44407) Clean up the compilation warnings related to `it will become a keyword in Scala 3`

     [ https://issues.apache.org/jira/browse/SPARK-44407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yang Jie reassigned SPARK-44407:
--------------------------------

    Assignee: Yang Jie

> Clean up the compilation warnings related to `it will become a keyword in Scala 3`
> ----------------------------------------------------------------------------------
>
>                 Key: SPARK-44407
>                 URL: https://issues.apache.org/jira/browse/SPARK-44407
>             Project: Spark
>          Issue Type: Sub-task
>          Components: Build
>    Affects Versions: 3.5.0
>            Reporter: Yang Jie
>            Assignee: Yang Jie
>            Priority: Minor
>              Labels: pull-request-available
>
> {code:java}
> [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 = _ {code}
> enum will become a keyword in Scala 3, this also includes {{export}} and {{{}given{}}}.
>  
> Scala 2.13
> {code:java}
> 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 {code}
>  
> Scala 3
>  
> {code:java}
> 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` {code}
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org