apatrida
01/02/2017, 4:40 PMval x = 10
Line 2:
println(x)
val x = 20
println(x)
outputs:
0
20
obviously because the scope of the variable assignment is for the whole script and therefore its default int value of 0 is seen before the assignment. Not sure if this will bite people later, but really the first println in Line_2 should reach back into Line_1.x and instead is this.x