On Tue Nov 20 12:16:04 2012, FROGGS.de wrote: > looks good today: > > <FROGGS> r: my Int @a = 1, 2, 3; my Str $x = "foo"; @a[0] := $x; say @a[0]; > <p6eval> rakudo bf472b: OUTPUT«foo» > > <FROGGS> r: my Int @a = 1, 2, 3; my Int $x = 5; @a[0] := $x; say @a[0]; > <p6eval> rakudo bf472b: OUTPUT«5» > > <FROGGS> r: my Int @a = 1, 2, 3; my $x = 5; @a[0] := $x; say @a[0]; > <p6eval> rakudo bf472b: OUTPUT«5» > > <FROGGS> r: my @a = 1, 2, 3; my Int $x = 5; @a[0] := $x; say @a[0]; > <p6eval> rakudo bf472b: OUTPUT«5»
The output is still the same as in 2012. I guess, this ticket hasn't been closed because the first command should actually die with X::TypeCheck. The other commands are fine, though. I added a test for those to S09-typed-arrays/arrays.t with commit https://github.com/perl6/roast/commit/8dd0ebb164 Since we have another ticket (https://rt.perl.org/Ticket/Display.html?id=123769) for the "should crash" case, I'm linking both tickets and closing this one as 'resolved'. On Wed Jan 05 07:01:52 2011, ja...@rcpt.to wrote: > PS: Is there any use to getting Unicode character "one half" (½), "one > quarter" (¼) and "three quarters" (¾) to be recognised for the rational > numerical value they represent. Such that "½ * 2 == 1", and "½ / ½ == > ¼"? I tried to define a "sub ¼ { return 0.25;}" but that didn't work.... :) BTW, there was an answer to this question about Unicode characters like ½ on #perl6 just today: < TimToady> m: constant term:<½> = 1/2; say ½ <+camelia> rakudo-moar 7b5256: OUTPUT«0.5» < TimToady> thing is, ½ is not alphanumeric < TimToady> m: say '½' ~~ /\w/ <+camelia> rakudo-moar 7b5256: OUTPUT«Nil» < TimToady> and only alphanumerics get treated as identifier fodder < TimToady> so any other term has to use the term:<> notation, just as you'd use infix:<> and such