summaryrefslogblamecommitdiff
path: root/test/files/neg/static-annot.scala
blob: c6c626d42b69f082660de43957d2e209fbba7185 (plain) (tree)
































                             













                                   
import annotation.static



class StaticInClass {
  @static val bar = 1
}


class NestedObjectInClass {
  object Nested {
    @static val blah = 2
  }
}


object NestedObjectInObject {
  object Nested {
    @static val succeed = 3
  }
}


object Conflicting {
  @static val bar = 1
}


class Conflicting {
  val bar = 45
}


object PrivateProtectedLazy {
  @static private val bar = 1
  @static private val baz = 2
  @static lazy val bam = 3
}


class PrivateProtectedLazy {
  println(PrivateProtectedLazy.bar)
  println(PrivateProtectedLazy.baz)
  println(PrivateProtectedLazy.bam)
}