aboutsummaryrefslogtreecommitdiff
path: root/tests/neg/singletons.scala
blob: 77e2a924fb99dc249ba5e5ace06c3f8f968fdd27 (plain) (blame)
1
2
3
4
5
6
object Test {
  final val y: 2 = { println("x"); 2 } // error: side effect
  val a: 42 = 43  // error: different constant
  val x = 42
  val z: 42 = x   // error: x is not final
}