Skip to content

Commit

Permalink
fixes #305: correctly output POPC in try.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kray-G committed Jul 19, 2021
1 parent df89b6d commit b056c1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/kinx.y
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ CatchVariable
;

FinallyStatement_Opt
: { $$ = NULL; }
| FINALLY BlockStatement { $$ = $2; }
: { $$ = kx_gen_block_object(NULL); }
| FINALLY BlockStatement { $$ = ($2 == NULL) ? kx_gen_block_object(NULL) : $2; }
;

BreakStatement
Expand Down
2 changes: 1 addition & 1 deletion src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -2154,7 +2154,7 @@ int yyparse(YYPARSE_ARG)
{ yyval.obj = kx_gen_var_object_line_pos(YYASP(2-3).strinfo.name, KX_UNKNOWN_T, YYASP(2-3).strinfo.line, YYASP(2-3).strinfo.pos1, YYASP(2-3).strinfo.pos2); } break;
case 83:
#line 354 "src/kinx.y"
{ yyval.obj = NULL; } break;
{ yyval.obj = kx_gen_block_object(NULL); } break;
case 84:
#line 355 "src/kinx.y"
{ yyval.obj = YYASP(2-2).obj; } break;
Expand Down

0 comments on commit b056c1d

Please sign in to comment.