aboutsummaryrefslogtreecommitdiff
path: root/v_windows/v/vlib/v/checker/tests/closure_immutable.out
diff options
context:
space:
mode:
Diffstat (limited to 'v_windows/v/vlib/v/checker/tests/closure_immutable.out')
-rw-r--r--v_windows/v/vlib/v/checker/tests/closure_immutable.out21
1 files changed, 21 insertions, 0 deletions
diff --git a/v_windows/v/vlib/v/checker/tests/closure_immutable.out b/v_windows/v/vlib/v/checker/tests/closure_immutable.out
new file mode 100644
index 0000000..bb93b27
--- /dev/null
+++ b/v_windows/v/vlib/v/checker/tests/closure_immutable.out
@@ -0,0 +1,21 @@
+vlib/v/checker/tests/closure_immutable.vv:4:3: error: `a` is immutable, declare it with `mut` to make it mutable
+ 2 | a := 1
+ 3 | f1 := fn [a] () {
+ 4 | a++
+ | ^
+ 5 | println(a)
+ 6 | }
+vlib/v/checker/tests/closure_immutable.vv:7:16: error: original `a` is immutable, declare it with `mut` to make it mutable
+ 5 | println(a)
+ 6 | }
+ 7 | f2 := fn [mut a] () {
+ | ^
+ 8 | a++
+ 9 | println(a)
+vlib/v/checker/tests/closure_immutable.vv:13:3: error: `b` is immutable, declare it with `mut` to make it mutable
+ 11 | mut b := 2
+ 12 | f3 := fn [b] () {
+ 13 | b++
+ | ^
+ 14 | println(b)
+ 15 | }