Fixed a bug in `void_expr_error`.
MODIFY
mrbgems/mruby-compiler/core/parse.y
mrbgems/mruby-compiler/core/parse.y
@@ -3474,10 +3474,12 @@ void_expr_error(parser_state *p, node *n)
void_expr_error(p, n->cdr->cdr);
break;
case NODE_BEGIN:
+ if (n->cdr) {
while (n->cdr) {
n = n->cdr;
}
void_expr_error(p, n->car);
+ }
break;
default:
break;

DELETE
test/t/codegen.rb
-##
-# Codegen tests
-
-assert('peephole optimization does not eliminate move whose result is reused') do
- assert_raise LocalJumpError do
- def method
- yield
- end
- method(&a &&= 0)
- end
-end
-
-assert('empty condition in ternary expression parses correctly') do
- assert_equal(() ? 1 : 2, 2)
-end
-
-assert('method call with exactly 127 arguments') do
- def args_to_ary(*args)
- args
- end
-
- assert_equal [0]*127, args_to_ary(
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, \
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, \
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, \
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, \
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, \
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
- )
-end
-
-assert('nested empty heredoc') do
- _, a = nil, <<B
-#{<<A}
-A
-B
- assert_equal "\n", a
-end
-
-assert('splat in case splat') do
- a = *case
- when 0
- * = 1
- end
-
- assert_equal [1], a
-end
-
-assert('undef with 127 or more arguments') do
- assert_raise NameError do
- undef
- a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a,
- a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a,
- a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a,
- a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a
- end
-end
-
-assert('next in normal loop with 127 arguments') do
- assert_raise NameError do
- while true
- next A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A
- end
- end
-end
-
-assert('negate literal register alignment') do
- a = *case
- when 0
- -0.0
- 2
- end
-
- assert_equal [2], a
-end

Fixed a bug in `void_expr_error`.