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
code_blocks_as_sub_args.t
Description: Binary data