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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to