blob: bbebb5f5115e0f6657c4c9e03638a2c49c48d14a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
trait A {
def foo: Long
}
object Test {
def a(): A = new A {
var foo: Long = 1000L
val test = () => {
foo = 28
}
}
def main(args: Array[String]) {
println(a().foo)
}
}
|