# New Ticket Created by  Stephen Weeks 
# Please include the string:  [perl #58506]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58506 >


The attached pir file tries to call a sub set :outer() another sub
without calling the outer sub first.

This fails with:
too few arguments passed (0) - 1 params expected
current instr.: 'bar' pc 3 (tlib.pir:4)
called from Sub 'foo' pc 19 (tlib.pir:10)

Setting the outer sub to :load also works.

I'm trying to do this because this is what the PIR PCT generates looks
like, and I'm trying to use a precompiled test.rb for cardinal.

Should I maybe be setting the top-level block to :load?

Rakudo seems to not be encountering this issue because of some stuff done
at :immediate time changing the $!proto of each sub.

Any ideas?
.sub "foo"  :anon :lexid("1")
.end

.sub "bar"  :lexid("2") :outer("1")
    .param pmc a
    print a
.end

.sub "main" :main
    'bar'(9)
.end

Reply via email to