Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #115506] [BUG] Bad failure mode when macro returns AST.new in Rakudo

14 views
Skip to first unread message

Carl Mäsak

unread,
Oct 27, 2012, 1:45:32 PM10/27/12
to bugs-bi...@rt.perl.org
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #115506]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=115506 >


<diakopter> r: macro marco { AST.new }; marco
<p6eval> rakudo 6859fb: OUTPUT«===SORRY!===␤Error while compiling
block : Error while compiling op call: Error while compiling block :
Error while compiling block : Unknown QAST node type Any␤»
<diakopter> :>
<masak> diakopter: fair point.
* masak submits rakudobug

Carl Mäsak via RT

unread,
Nov 3, 2012, 12:17:07 PM11/3/12
to perl6-c...@perl.org
On Sat Oct 27 10:45:32 2012, masak wrote:
> <diakopter> r: macro marco { AST.new }; marco
> <p6eval> rakudo 6859fb: OUTPUT«===SORRY!===␤Error while compiling
> block : Error while compiling op call: Error while compiling block :
> Error while compiling block : Unknown QAST node type Any␤»
> <diakopter> :>
> <masak> diakopter: fair point.
> * masak submits rakudobug

Fixed as of 026880:

$ nom -e 'macro pathological { AST.new }; pathological(); say "alive"'
alive

Tagging testneeded.

Will Coleda via RT

unread,
Nov 13, 2012, 10:17:20 PM11/13/12
to perl6-c...@perl.org
I was unable to test this:

#RT #115506
eval_lives_ok
"macro pathological { AST.new }; pathological();",
"macro returning AST.new doesn't blow up";

fails with:

prove -v -e t/fudgeandrun t/spec/S06-macros/errors.tt/spec/S06-macros/errors.t ..
1..1
not ok 1 - macro returning AST.new doesn't blow up
# Error: Missing block
# Looks like you failed 1 tests of 1

--
Will "Coke" Coleda

Carl Mäsak via RT

unread,
Nov 14, 2012, 8:24:30 AM11/14/12
to perl6-c...@perl.org
coke (>):
> I was unable to test this:
>
> #RT #115506
> eval_lives_ok
> "macro pathological { AST.new }; pathological();",
> "macro returning AST.new doesn't blow up";
>
> fails with:
>
> prove -v -e t/fudgeandrun t/spec/S06-macros/errors.tt/spec/S06-
> macros/errors.t ..
> 1..1
> not ok 1 - macro returning AST.new doesn't blow up
> # Error: Missing block
> # Looks like you failed 1 tests of 1

Double-quoted "" strings interpolate {} blocks. So I don't think the
first argument to eval_lives_ok means what you think it means. I've done
the same thinko myself a number of times.

Will Coleda via RT

unread,
Nov 14, 2012, 10:16:53 AM11/14/12
to perl6-c...@perl.org
*facepalm*

Created new test file, S06-macros/errors.t, rakudo now runs that file.



--
Will "Coke" Coleda
0 new messages