Skip to content

Instantly share code, notes, and snippets.

@xuwei-k
Last active December 29, 2015 21:59
Show Gist options
  • Save xuwei-k/7733744 to your computer and use it in GitHub Desktop.
Save xuwei-k/7733744 to your computer and use it in GitHub Desktop.
Scala2.11 awesome!
scalaVersion := "2.11.0-M7"
scalacOptions ++= Seq("-Xlint")
import scala.sys._
object Main{
val a = b + "foo"
val b = "b"
def hoge(): Unit = {
val x = 0
println("bar $x")
}
}
[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