The addition of two quasis with arithmetical expressions works on Moar and JVM.
On Parrot the old error ("Cannot call 'infix:<+>'; none of these signatures
match") is gone, but the result of the addition is still wrong.
$ perl6-m -e 'macro bohr() { my $q1 = quasi { 6 }; my $q2 = quasi { 6 * 10 };
quasi { {{{$q1}}} + {{{$q2}}} } }; say bohr()'
66
$ perl6-p -e 'macro bohr() { my $q1 = quasi { 6 }; my $q2 = quasi { 6 * 10 };
quasi { {{{$q1}}} + {{{$q2}}} } }; say bohr()'
120
(It's the same with "{ 5 + 1}" for the first quasi.)
I added two tests (fudged 'skip' for Parrot) to S06-macros/quasi-blocks.t with
the following commit:
https://github.com/perl6/roast/commit/bab9270ab7c50b36259c2adf02f4a88e6bc22659
Please note: There is something strange with the failing parrot tests. I have
fudged them as 'skip' because if I fudge both tests as 'todo' and run "perl
t/harness --fudge" manually, it reports one passed TODO:
$ perl t/harness --fudge t/spec/S06-macros/quasi-blocks.t
t/spec/S06-macros/quasi-blocks.rakudo.parrot .. ok
All tests successful.
Test Summary Report
-------------------
t/spec/S06-macros/quasi-blocks.rakudo.parrot (Wstat: 0 Tests: 14 Failed: 0)
TODO passed: 1
Files=1, Tests=14, 6 wallclock secs ( 0.02 usr 0.01 sys + 5.47 cusr 0.22
csys = 5.72 CPU)
Result: PASS
But if I execute the thereby generated test file
t/spec/S06-macros/quasi-blocks.rakudo.parrot both tests fail. (So there is no
passed TODO.):
$ perl6-p t/spec/S06-macros/quasi-blocks.rakudo.parrot
[...]
not ok 13 - addition of two quasis with arithmetical expressions works (1)#
TODO RT #115500
# Failed test 'addition of two quasis with arithmetical expressions works (1)'
# at t/spec/S06-macros/quasi-blocks.rakudo.parrot line 129
# expected: '66'
# got: '120'
not ok 14 - addition of two quasis with arithmetical expressions works (2)#
TODO RT #115500
# Failed test 'addition of two quasis with arithmetical expressions works (2)'
# at t/spec/S06-macros/quasi-blocks.rakudo.parrot line 136
# expected: '66'
# got: '120'
# FUDGED!