blob: 8425e7f77a3e7ac5ec5e08a209d19094364f9b24 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
import scala.annotation.static
class Foo{
class Bar {
def qwa =
Bar.field
// 0: invokestatic #31 // Method Foo$Bar$.field:()I
// 3: ireturn
}
object Bar {
@static
val field = 1
}
}
object Foo{
@static
def method = 1
@static
val field = 2
@static
var mutable = 3
@static
def accessor = field
}
object Test {
import Foo._
def main(args: Array[String]): Unit = {
method + field + mutable + accessor
}
}
class WithLazies{
@volatile lazy val s = 1
// 98: getstatic #30 // Field WithLazies$.OFFSET$0:J
}
|