This is an automatically generated mail to inform you that tests are now available in t/spec/S02-builtin_data_types/anon_block.t
commit 649dc2cb2a29b472f30c35d88b4c3ac66e9a19f1 Author: kyle <k...@c213334d-75ef-0310-aa23-eaa082d1ae64> Date: Mon Aug 10 21:51:55 2009 +0000 [t/spec] Test for RT #68116 git-svn-id: http://svn.pugscode.org/p...@27954 c213334d-75ef-0310-aa23-eaa082d1ae64 diff --git a/t/spec/S02-builtin_data_types/anon_block.t b/t/spec/S02-builtin_data_types/anon_block.t index d0862a1..b75ac81 100644 --- a/t/spec/S02-builtin_data_types/anon_block.t +++ b/t/spec/S02-builtin_data_types/anon_block.t @@ -11,7 +11,7 @@ This covers anonymous blocks and subs, as well as pointy blocks =end description -plan 34; +plan 42; # L<S04/"The Relationship of Blocks and Declarations"> # L<S06/"Anonymous subroutines"> @@ -126,4 +126,27 @@ is((sub { { { 3 } } }).(), 3, 'ditto, even if nested'); dies_ok({(sub { { $^x } }).()}, 'implicit params become errors'); isnt((sub { -> { 3 } }).(), 3, 'as are pointies'); +# RT #68116 +{ + sub rt68116 { 68116 } + is &rt68116(), 68116, 'check that sub is callable via &'; + is { &^x() }.( &rt68116 ), 68116, + 'call via { &^pos() }( &s ) works for sub'; + is -> &x { &x() }.( &rt68116 ), 68116, + 'call via -> &point { &point() }.( &s ) works for sub'; + is (sub (&x) { &x() }).( &rt68116 ), 68116, + 'call via (sub (&x) { &x() }).( &s ) works for sub'; + + multi mone { 'one' } + is &mone(), 'one', 'check that mutli is callable via &'; + #?rakudo 3 skip 'RT #68116' + is { &^x() }.( &mone ), 'one', + 'call via { &^pos() }( &s ) works for multi'; + is -> &x { &x() }.( &mone ), 'one', + 'call via -> &point { &point() }.( &s ) works for multi'; + is (sub (&x) { &x() }).( &mone ), 'one', + 'call via (sub (&x) { &x() }).( &s ) works for multi'; + +} + # vim: ft=perl6