Skip to content

Commit 47f2fc4

Browse files
committed
Fix #11100: add test
1 parent ce8eac1 commit 47f2fc4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/neg/i11100.scala

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import scala.annotation.static
2+
3+
class C {
4+
val a: Int = 3
5+
class D
6+
object D {
7+
@static def foo: Int = a * a // error
8+
}
9+
}
10+
11+
@main
12+
def Test =
13+
val c = new C
14+
println(c.D.foo)

0 commit comments

Comments
 (0)