On Thu May 27 00:44:18 2010, moritz wrote: > Not sure if this should work: > > 09:39 < isBEKaml> rakudo: enum somenum <a b c d e>; my somenum $temp = > 3; say $temp.key; > 09:39 <+p6eval> rakudo 982e8e: OUTPUT«Type check failed for > assignmentcurrent instr.: '&die' pc 18373 (src/builtins/Junction.pir:373)» > > But this should work for sure: > > 09:39 <@moritz_> rakudo: enum somenum <a b c d e>; my somenum $temp = d; > say $temp > 09:39 <+p6eval> rakudo 982e8e: OUTPUT«Type check failed for > assignmentcurrent instr.: '&die' pc 18373 (src/builtins/Junction.pir:373)»
Still don't know if the first one should work, but the second one does work now: 15:27 < [Coke]> rakudo: enum somenum <a b c d e>; my somenum $temp = 3; say $temp.key; 15:27 <+p6eval> rakudo ce15be: OUTPUT«Type check failed in assignment to '$temp'; expected 'somenum' but got 'Int' in block <anon> at /tmp/5fZwMAEju3:1 in <anon> at /tmp/5fZwMAEju3:1» 15:27 < [Coke]> rakudo: enum somenum <a b c d e>; my somenum $temp = d; say $temp; 15:27 <+p6eval> rakudo ce15be: OUTPUT«somenum::d» -- Will "Coke" Coleda