Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sample code: ``` my $foo := 42; my int $bar := $foo || 200; say($bar); ``` Before it says '0' and now '42'. The problem is we generate $foo || 200 as - QAST::Op(unless &infix:<||>) || - QAST::Var(lexical $bar) - QAST::IVal(200) and thus $bar only be a condition. If we want to return its value, we forget to coerce its kind. Now this fix only apply on op_unless. If applies on the four ops handled this block, it fails some tests in t/qast/01-qast.t.
- Loading branch information
Showing
2 changed files
with
18 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters