You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/05/25 10:37:04 UTC

[GitHub] [spark] som-snytt commented on pull request #32648: [WIP][SPARK-35496][BUILD] Upgrade Scala to 2.13.6

som-snytt commented on pull request #32648:
URL: https://github.com/apache/spark/pull/32648#issuecomment-847756599


   Sample for wconf, where `i` says "info", `s` would be silence. It warns about deprecation but outer check is just info.
   ```
   ➜  snips scalac -d /tmp -Xlint "-Wconf:cat=unchecked&msg=outer reference:i" -Werror badcheck.scala
   badcheck.scala:11: warning: method g in class C is deprecated (since 0.1): bad g
     def x = g + 1
             ^
   badcheck.scala:7: The outer reference in this type test cannot be checked at run time.
       case _: U => true
             ^
   error: No warnings can be incurred under -Werror.
   1 warning
   1 error
   ➜  snips cat badcheck.scala
   
   class C {
     trait T
     trait U
   
     def f(t: T) = t match {
       case _: U => true
       case _ => false
     }
     @deprecated("bad g", "0.1") def g = 42
     def x = g + 1
   }
   ```
   I have to re-read `-Wconf:help` if I use it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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