# New Ticket Created by  Jan-Olof Hendig 
# Please include the string:  [perl #129321]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=129321 >


# tested with

dogbert@dogbert-VirtualBox ~ $ perl6 -v
This is Rakudo version 2016.09-19-g8be36b1 built on MoarVM version 2016.09
implementing Perl 6.c

# the following two examples behave quite differently

dogbert@dogbert-VirtualBox ~ $ perl6 -e 'my @a = [1,[2,3],4]; dd
@a.duckmap({ $_ ~~ Int ?? $_ !! Any })'   # this works as expected
(1, (2, 3), 4)

dogbert@dogbert-VirtualBox ~ $ perl6 -e 'my @a = [1,[2,3],"a"]; dd
@a.duckmap({ $_ ~~ Int ?? $_ !! Any })'  # this will hang or return 'Memory
allocation failed; could not allocate xxxxxx bytes'

/dogbert17


Reply via email to