$ sudo docker-compose run dev
[3/3] STEP 11/14: WORKDIR $COTOWALI_ROOT
--> Using cache e47c56a51eb4e0ad1d40675aca868b75747b9dd9d6a67554f6b3a43f6e1ecc6d
--> e47c56a51eb
[3/3] STEP 12/14: COPY . .
--> 3b13ea09ce7
[3/3] STEP 13/14: RUN z build && z symlink
cotowali/ast/expr.v:72:12: error: `expr` is immutable, declare it with `mut` to make it mutable
70 |
71 | fn (mut r Resolver) expr(expr Expr, opt ResolveExprOpt) {
72 | match mut expr {
| ~~~~
73 | ArrayLiteral { r.array_literal(mut expr, opt) }
74 | AsExpr { r.as_expr(expr, opt) }
cotowali/ast/expr.v:234:19: error: `e` is immutable, declare it with `mut` to make it mutable
232 |
233 | pub fn (e Expr) typ() Type {
234 | return match mut e {
| ^
235 | ArrayLiteral { e.scope.lookup_or_register_array_type(elem: e.elem_typ).typ }
236 | AsExpr { e.typ }
cotowali/ast/stmt.v:51:12: error: `stmt` is immutable, declare it with `mut` to make it mutable
49 |
50 | fn (mut r Resolver) stmt(stmt Stmt) {
51 | match mut stmt {
| ~~~~
52 | AssertStmt { r.assert_stmt(stmt) }
53 | AssignStmt { r.assign_stmt(mut stmt) }
cotowali/ast/stmt.v:168:13: error: `left` is immutable, declare it with `mut` to make it mutable
166 | }
167 | for i, left in stmt.left.exprs {
168 | if mut left is Var {
| ~~~~
169 | name, pos := left.ident.text, left.ident.pos
170 | typ := if i < expr_types.len {
cotowali/checker/stmt.v:71:12: error: `stmt` is immutable, declare it with `mut` to make it mutable
69 | }
70 |
71 | match mut stmt {
| ~~~~
72 | ast.AssignStmt { c.assign_stmt(mut stmt) }
73 | ast.AssertStmt { c.assert_stmt(stmt) }
cotowali/emit/sh/array.v:13:33: error: cannot use `fn (mut sh.Emitter, ast.ArrayLiteral, string>)` as `fn (mut sh.Emitter, T)` in argument 2 to `cotowali.emit.sh.Emitter.insert_at`
11 | fn (mut e Emitter) array_literal(expr ast.ArrayLiteral, opt ExprOpt) {
12 | ident := e.ident_for(expr)
13 | e.insert_at(e.stmt_head_pos(), fn (mut e Emitter, v ExprWithValue<ast.ArrayLiteral, string>) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 | ident := v.value
15 | e.assign(ident, ast.Expr(v.expr), ast.Expr(v.expr).type_symbol())
cotowali/emit/sh/array.v:58:31: error: cannot use `fn (mut sh.Emitter, ast.InfixExpr)` as `fn (mut sh.Emitter, T)` in argument 1 to `cotowali.emit.sh.Emitter.sh_test_command_for_expr`
56 | match expr.op.kind {
57 | .eq, .ne {
58 | e.sh_test_command_for_expr(fn (mut e Emitter, expr ast.InfixExpr) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
59 | e.array_to_str(expr.left)
60 | e.write(if expr.op.kind == .eq { ' = ' } else { ' != ' })
cotowali/emit/sh/array.v:66:35: error: cannot use `fn (mut sh.Emitter, ast.InfixExpr, string>)` as `fn (mut sh.Emitter, T)` in argument 2 to `cotowali.emit.sh.Emitter.insert_at`
64 | .plus {
65 | ident := e.new_tmp_ident()
66 | e.insert_at(e.stmt_head_pos(), fn (mut e Emitter, v ExprWithValue<ast.InfixExpr, string>) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67 | expr, ident := v.expr, v.value
68 | e.write('array_copy $ident ')
cotowali/emit/sh/assign.v:78:29: error: cannot use `fn (mut sh.Emitter, sh.ExprOrString)` as `fn (mut sh.Emitter, T)` in argument 2 to `cotowali.emit.sh.Emitter.sh_define_function`
76 |
77 | fn (mut e Emitter) fn_assign(name string, value ExprOrString) {
78 | e.sh_define_function(name, fn (mut e Emitter, value ExprOrString) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
79 | target := if value is string { value } else { e.ident_for(value as ast.Expr) }
80 | e.writeln(target + r' "$@"') // passthrough arguments
cotowali/emit/sh/expr.v:109:33: error: cannot use `fn (mut sh.Emitter, util.Tuple2<string, string>)` as `fn (mut sh.Emitter, T)` in argument 2 to `cotowali.emit.sh.Emitter.insert_at`
107 |
108 | tmp_var := e.new_tmp_ident()
109 | e.insert_at(e.stmt_head_pos(), fn (mut e Emitter, v Tuple2<string, string>) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
110 | tmp_var, text := v.v1, v.v2
111 | e.write('$tmp_var="\$(')
cotowali/emit/sh/expr.v:194:28: error: cannot use `fn (mut sh.Emitter, ast.IndexExpr>)` as `fn (mut sh.Emitter, T)` in argument 1 to `cotowali.emit.sh.Emitter.sh_command_substitution`
192 | e.write_echo_if_command(opt)
193 |
194 | e.sh_command_substitution(fn (mut e Emitter, v ExprWithOpt<ast.IndexExpr>) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
195 | left_ts := v.expr.left.type_symbol().resolved()
196 |
cotowali/emit/sh/expr.v:278:30: error: cannot use `fn (mut sh.Emitter, ast.InfixExpr)` as `fn (mut sh.Emitter, T)` in argument 1 to `cotowali.emit.sh.Emitter.sh_test_command_for_expr`
276 |
277 | if expr.op.kind in [.eq, .ne] {
278 | e.sh_test_command_for_expr(fn (mut e Emitter, expr ast.InfixExpr) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
279 | op := if expr.op.kind == .eq { ' = ' } else { ' != ' }
280 | e.sh_test_cond_infix(expr.left, op, expr.right)
cotowali/emit/sh/expr.v:327:30: error: cannot use `fn (mut sh.Emitter, ast.InfixExpr)` as `fn (mut sh.Emitter, T)` in argument 1 to `cotowali.emit.sh.Emitter.sh_test_command_for_expr`
325 |
326 | if expr.op.kind.@is(.comparsion_op) {
327 | e.sh_test_command_for_expr(fn (mut e Emitter, expr ast.InfixExpr) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
328 | e.sh_awk_infix_expr(expr)
329 | e.write(' -eq 1')
cotowali/emit/sh/expr.v:346:30: error: cannot use `fn (mut sh.Emitter, ast.InfixExpr)` as `fn (mut sh.Emitter, T)` in argument 1 to `cotowali.emit.sh.Emitter.sh_test_command_for_expr`
344 |
345 | if expr.op.kind.@is(.comparsion_op) {
346 | e.sh_test_command_for_expr(fn (mut e Emitter, expr ast.InfixExpr) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
347 | op := match expr.op.kind {
348 | .eq { '-eq' }
cotowali/emit/sh/expr.v:391:31: error: cannot use `fn (mut sh.Emitter, ast.InfixExpr)` as `fn (mut sh.Emitter, T)` in argument 1 to `cotowali.emit.sh.Emitter.sh_test_command_for_expr`
389 | match expr.op.kind {
390 | .eq, .ne {
391 | e.sh_test_command_for_expr(fn (mut e Emitter, expr ast.InfixExpr) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
392 | op := if expr.op.kind == .eq { ' = ' } else { ' != ' }
393 | e.sh_test_cond_infix(expr.left, op, expr.right)
cotowali/emit/sh/expr.v:417:31: error: cannot use `fn (mut sh.Emitter, ast.InfixExpr)` as `fn (mut sh.Emitter, T)` in argument 1 to `cotowali.emit.sh.Emitter.sh_test_command_for_expr`
415 | match expr.op.kind {
416 | .eq, .ne {
417 | e.sh_test_command_for_expr(fn (mut e Emitter, expr ast.InfixExpr) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
418 | op := if expr.op.kind == .eq { ' = ' } else { ' != ' }
419 | e.sh_test_cond_infix(expr.left, op, expr.right)
cotowali/emit/sh/expr.v:534:29: error: cannot use `fn (mut sh.Emitter, ast.Pipeline)` as `fn (mut sh.Emitter, T)` in argument 1 to `cotowali.emit.sh.Emitter.sh_command_substitution`
532 | f(mut e, expr)
533 | } else {
534 | e.sh_command_substitution(f, expr, opt)
| ^
535 | }
536 | }
cotowali/emit/sh/fn.v:116:33: error: cannot use `fn (mut sh.Emitter, ast.FnDecl)` as `fn (mut sh.Emitter, T)` in argument 2 to `cotowali.emit.sh.Emitter.sh_define_function`
114 | }
115 |
116 | e.sh_define_function(fn_ident, fn (mut e Emitter, node FnDecl) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
117 | for i, param in node.params {
118 | value := if i == node.params.len - 1 && node.function_info().variadic {
cotowali/emit/sh/map.v:12:33: error: cannot use `fn (mut sh.Emitter, ast.MapLiteral, string>)` as `fn (mut sh.Emitter, T)` in argument 2 to `cotowali.emit.sh.Emitter.insert_at`
10 | fn (mut e Emitter) map_literal(expr MapLiteral, opt ExprOpt) {
11 | ident := e.ident_for(expr)
12 | e.insert_at(e.stmt_head_pos(), fn (mut e Emitter, v ExprWithValue<MapLiteral, string>) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13 | ident := v.value
14 | for entry in v.expr.entries {
cotowali/emit/sh/string_literal.v:123:33: error: cannot use `fn (mut sh.Emitter, ast.StringLiteral, string>)` as `fn (mut sh.Emitter, T)` in argument 2 to `cotowali.emit.sh.Emitter.insert_at`
121 |
122 | tmp_var := e.new_tmp_ident()
123 | e.insert_at(e.stmt_head_pos(), fn (mut e Emitter, arg ExprWithValue<StringLiteral, string>) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
124 | expr := arg.expr
125 | tmp_var := arg.value
exit status 1
exit status 1