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


use v6;

sub somesub(){
         say "i haz a sub";
};

class Foo {
         has @.a is rw;
         method add(&c){ @.a.push(&c) }
         method postcircumfix:<( )>($self: |$c) {
                 #since i stripped self into $self, the capture should be empty
                 @.a>>.(|$c)
         }
}

my $foo = Foo.new;
$foo.add(&somesub);

$foo();
#> Too many positional parameters passed; got 1 but expected 0
#> in sub somesub at empty_capture.p6:3

Reply via email to