We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 976702a commit 65961a9Copy full SHA for 65961a9
tests/run/statics.scala
@@ -0,0 +1,40 @@
1
+import scala.annotation.static
2
+
3
+class Foo{
4
+ class Bar {
5
+ def qwa =
6
+ Bar.field
7
+ // 0: invokestatic #31 // Method Foo$Bar$.field:()I
8
+ // 3: ireturn
9
+ }
10
+ object Bar {
11
+ @static
12
+ val field = 1
13
14
+}
15
16
+object Foo{
17
18
+ def method = 1
19
20
21
+ val field = 2
22
23
24
+ var mutable = 3
25
26
27
+ def accessor = field
28
29
30
+object Test {
31
+ import Foo._
32
+ def main(args: Array[String]): Unit = {
33
+ method + field + mutable + accessor
34
35
36
37
+class WithLazies{
38
+ @volatile lazy val s = 1
39
+ // 98: getstatic #30 // Field WithLazies$.OFFSET$0:J
40
0 commit comments