v2 / vlib / v / checker / tests / function_arg_mutable_err.out
6 lines · 6 sloc · 322 bytes · a38fc89150c64d2808586f0caf1fceec1f21f9d4
Raw
1vlib/v/checker/tests/function_arg_mutable_err.vv:1:18: error: mutable arguments are only allowed for arrays, interfaces, maps, pointers, structs or their aliases
2return values instead: `fn foo(mut n int) {` => `fn foo(n int) int {`
3 1 | fn mod_ptr(mut a int) {
4 | ~~~
5 2 | a = 77
6 3 | }
7