v2 / vlib / v / checker / tests / globals / closure_capture_global_var.out
7 lines · 7 sloc · 267 bytes · e2e5cf8db56f3562c7baa735061690be936bdf3e
Raw
1vlib/v/checker/tests/globals/closure_capture_global_var.vv:12:12: error: no need to capture global variable `number` in closure
2 10 |
3 11 | fn main() {
4 12 | f1 := fn [number] () {
5 | ~~~~~~
6 13 | println(number)
7 14 | }
8