You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
apm@mara:~/clones/review/emergent$ scalacm -Ywarn-unused -Ystop-after:refcheck badwarn.scala
badwarn.scala:9:warning: privateobjectinobjectFoo is never used
privateimplicitclassFrobnicator(vali:Int) extendsAnyVal {
^
one warning found
apm@mara:~/clones/review/emergent$ ./build/pack/bin/scalac -Ywarn-unused -Ystop-after:refcheck badwarn.scala
apm@mara:~/clones/review/emergent$
$ scala -Ywarn-unused
Welcome to Scala 2.12.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_111).
Type in expressions for evaluation. Or try :help.
scala> :pa
// Entering paste mode (ctrl-D to finish)
final class Foo {
import Foo._
def f(x: Int): Int = x.frob
}
object Foo {
private implicit class Frobnicator(val i: Int) extends AnyVal {
def frob: Int = i + 1729
}
}
// Exiting paste mode, now interpreting.
defined class Foo
defined object Foo
scala>
A private extension method value class triggers unused warning:
The text was updated successfully, but these errors were encountered: