So I am trying to implement throws_ok into Test.pm and I ran into this bug:

pugs -e 'sub foo (Sub $code, Str $a, Str ?$b) { ref($a).say }; foo -> { "test" }, "test", "test2";'
prints:
List

I also tried a number of other versions of this as well this one is the only one which works:

pugs -e 'sub foo (Sub $code, Str $a, Str ?$b) { ref($a).say }; my $block = { die "test" }; foo $block, "test", "test2";'
it prints:
Str

Attached is a t/pugsbugs/ test for it.

- Stevan


Attachment: code_blocks_as_sub_args.t
Description: Binary data

Reply via email to