Optimization of string and vector with references and less functional code, bugfix of closing over references
This commit is contained in:
17
tests/test_close_over_references.krak
Normal file
17
tests/test_close_over_references.krak
Normal file
@@ -0,0 +1,17 @@
|
||||
import io:*
|
||||
|
||||
fun func(it: ref int) {
|
||||
it++
|
||||
fun() {
|
||||
it++
|
||||
println(it)
|
||||
}()
|
||||
}
|
||||
|
||||
fun main(): int {
|
||||
var it = 7
|
||||
func(it)
|
||||
println(it)
|
||||
|
||||
return 0
|
||||
}
|
||||
Reference in New Issue
Block a user