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 hidden or 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-M7" | |
scalacOptions ++= Seq("-Xlint") |
This file contains hidden or 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" | |
def hoge(): Unit = { | |
val x = 0 | |
println("bar $x") | |
} | |
} | |
This file contains hidden or 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:9: `$x` looks like an interpolated identifier! Did you forget the interpolator? | |
[warn] println("bar $x") | |
[warn] ^ | |
[warn] Main.scala:1: Unused import | |
[warn] import scala.sys._ | |
[warn] ^ | |
[warn] Main.scala:8: 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] four warnings found |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment