summaryrefslogtreecommitdiff
path: root/test/files/neg/static-annot.check
blob: c98e7d96580b72ebabd3abf4be56a8df60db391f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
static-annot.scala:8: error: Only members of top-level objects and their nested objects can be annotated with @static.
  @static val bar = 1
              ^
static-annot.scala:27: error: @static annotated field bar  has the same name as a member of class Conflicting
  @static val bar = 1
              ^
static-annot.scala:37: error: The @static annotation is only allowed on public members.
  @static private val bar = 1
                      ^
static-annot.scala:38: error: The @static annotation is only allowed on public members.
  @static private val baz = 2
                      ^
static-annot.scala:39: error: The @static annotation is not allowed on lazy members.
  @static lazy val bam = 3
                   ^
static-annot.scala:52: error: The @static annotation is not allowed on method definitions.
  @static def x = 42
              ^
static-annot.scala:14: error: Only members of top-level objects and their nested objects can be annotated with @static.
    @static val blah = 2
                ^
7 errors found