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


<masak> nom: my $t = q[%foo% %bar% %foo% %baz%]; my %b = foo => 1, bar
=> 2, baz => 3; $t.=subst("%{.key}%", .value, :g) for %b.pairs; say $t
<p6eval> nom 4f19b7: OUTPUT«Method 'key' not found for invocant of
class 'Any' [...]
<masak> b: my $t = q[%foo% %bar% %foo% %baz%]; my %b = foo => 1, bar
=> 2, baz => 3; $t.=subst("%{.key}%", .value, :g) for %b.pairs; say $t
<p6eval> b 1b7dd1: OUTPUT«1 2 1 3␤»
<moritz> nom: my %b = foo => 1, bar => 2, baz => 3; say "{.key}" for %b.pairs
<p6eval> nom 4f19b7: OUTPUT«Method 'key' not found for invocant of
class 'Any' [...]
<moritz> b: my %b = foo => 1, bar => 2, baz => 3; say "{.key}" for %b.pairs
<p6eval> b 1b7dd1: OUTPUT«foo␤bar␤baz␤»
<moritz> nom: say "{.key}" given a => 1
<p6eval> nom 4f19b7: OUTPUT«Method 'key' not found for invocant of
class 'Any' [...]
<moritz> b: say "{.key}" given a => 1
<p6eval> b 1b7dd1: OUTPUT«a␤»
<moritz> nom: $_ = a => 1; say "{.key}"
<p6eval> nom 4f19b7: OUTPUT«a␤»
<masak> odd, no?
<moritz> yes, seems like topicalization by 'given' and 'for' does
something differently
<moritz> ... different than $_ assignment, that is
* masak submits rakudobug

Reply via email to