diff --git a/compiler/parser.v b/compiler/parser.v index 1045094a4f..5325c5b989 100644 --- a/compiler/parser.v +++ b/compiler/parser.v @@ -1822,7 +1822,6 @@ fn (p mut Parser) dot(str_typ string, method_ph int) string { f := p.first_immutable_field p.error('cannot modify immutable field `$f.name` (type `$f.parent_fn`)\n' + 'declare the field with `mut:` - struct $f.parent_fn { mut: $f.name $f.typ diff --git a/compiler/tests/repl/repl_test.v b/compiler/tests/repl/repl_test.v index 960d4f12a5..a4ff4b40f3 100644 --- a/compiler/tests/repl/repl_test.v +++ b/compiler/tests/repl/repl_test.v @@ -54,7 +54,7 @@ fn test_the_v_repl() { assert false break } - result := r.output.replace('\r','').replace('>>> ', '').replace('>>>', '').replace('... ', '').all_after('Use Ctrl-C or `exit` to exit\n').replace( wd, '' ) + result := r.output.replace('\r','').replace('>>> ', '').replace('>>>', '').replace('... ', '').all_after('Use Ctrl-C or `exit` to exit\n').replace(wd, '' ) assert result == output if result != output { println(file)