add perentheses around closed variable access (*closed_variables->a), etc, so that nothing can have higher precidence than the dereference (++ was incrementing the pointer instead of the value)
This commit is contained in:
@@ -34,6 +34,12 @@ fun main():int {
|
||||
var idx = 0
|
||||
runLambda(fun():int { return v.get(idx);})
|
||||
|
||||
var outside = 40
|
||||
runLambda(fun():int { var toRet = outside; outside += 1; return toRet;})
|
||||
println(outside)
|
||||
runLambda(fun():int { var toRet = outside; outside++; return toRet;})
|
||||
println(outside)
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user