Last active
December 29, 2015 21:59
-
-
Save xuwei-k/7733744 to your computer and use it in GitHub Desktop.
Scala2.11 awesome!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scalaVersion := "2.11.0" | |
scalacOptions ++= Seq("-Ywarn-unused", "-Ywarn-unused-import", "-Xlint") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.sys._ | |
object Main{ | |
val a = b + "foo" | |
val b = "b" | |
private val c = 0 | |
private var d = 1 | |
println(d) | |
def hoge(): Unit = { | |
val x = 0 | |
println("foo $x") | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[warn] Main.scala:14: `$x` looks like an interpolated identifier! Did you forget the interpolator? | |
[warn] println("foo $x") | |
[warn] ^ | |
[warn] Main.scala:1: Unused import | |
[warn] import scala.sys._ | |
[warn] ^ | |
[warn] Main.scala:7: private val in object Main is never used | |
[warn] private val c = 0 | |
[warn] ^ | |
[warn] Main.scala:8: private setter in object Main is never used | |
[warn] private var d = 1 | |
[warn] ^ | |
[warn] Main.scala:13: local val in method hoge is never used | |
[warn] val x = 0 | |
[warn] ^ | |
[warn] Main.scala:4: Reference to uninitialized value b | |
[warn] val a = b + "foo" | |
[warn] ^ | |
[warn] 6 warnings found |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment