aboutsummaryrefslogblamecommitdiff
path: root/tests/neg/singletons.scala
blob: e4c6db0601d9ad4de37cd4eda4eef161e24e0ce5 (plain) (tree)
1
2
3
4
5
6
7
8
9
             


                                              



                                                                 
 
object Test {
  val a: 42 = 43  // error: different constant
  val x = 42
  val z: 42 = x   // error: x is not final

  val n: null = null // error: Null is not a legal singleton type

  val sym: 'sym = 'sym // error: Symbol is a legal singleton type
}