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


<sbp> not entirely sure what's going on there. what is the use case in
general for declaring that you *don't* want parameters?
<ruoso> sbp, to fail if anyone tries to send one?
<ruoso> rakudo: -> { say 'live' }.(123);
<p6eval> rakudo 78cb4c: OUTPUT«live␤»
<ruoso> oops
<ruoso> hmm
<ruoso> rakudo: -> { say $_ }.(123);
<p6eval> rakudo 78cb4c: OUTPUT«Use of uninitialized value␤␤»
<ruoso> hmm... for sure a rakudobug

I think -> { ... } implies an empty signature, so it would fail if you
call it with a parameter...

but then in a following test, I realized the problem is not related to
pointy blocks at all...

<ruoso> rakudo: sub foo() {}; foo(123);
<p6eval> rakudo 78cb4c:  ( no output )

That was supposed to break...

With a further investigation, I found out that...

<ruoso> rakudo: sub foo() { say @_[0] }; foo(123)
<p6eval> rakudo 78cb4c: OUTPUT«123␤»
<ruoso> rakudo: -> { say @_[0] }.(123);
<p6eval> rakudo 78cb4c: OUTPUT«123␤»

Which means that it is actually assuming the default rountine signature,
when both cases imply an empty signature instead...

daniel

Reply via email to