On Fri Sep 03 21:48:08 2010, masak wrote:
> <JimmyZ> rakudo: sub infix:<+-*/>($a, $b) { ( { $a + $b }, { $a - $b
> }, { $a * $b }, { $a / $b } )>>.() }; say 5+-*/2;
> <p6eval> rakudo 52f9ea: OUTPUT«Tried to find null name in 'infix:<+-
> */>' [...]
> <JimmyZ> 这个代码有什么错误?
> <masak> I don't know. It's related to the >>.(), to be sure.
> <JimmyZ> yes
> <masak> but I'm not sure if it should be allowed or no.
> <masak> rakudo: say ( { 1 + 1 }, { 2 + 2 } )>>.()
> <p6eval> rakudo 52f9ea: OUTPUT«Tried to find null name [...]
> <masak> rakudo: say ( { 1 + 1 }, { 2 + 2 } )>>()
> <p6eval> rakudo 52f9ea: OUTPUT«Tried to find null name [...]
> * masak submits rakudobug
The first one (perhaps correctly) now gives a whatever code.
The second one works. The third one still fails, but differently.
22:05 < [Coke]> rakudo: sub infix:<+-*/>($a, $b) { ( { $a + $b }, { $a - $b },
{ $a * $b }, { $a / $b } )>>.() }; say 5+-*/2
22:05 <+p6eval> rakudo 29f5cf: OUTPUT«WhateverCode.new()»
22:05 < [Coke]> rakudo: say ( { 1 + 1 }, { 2 + 2 } )>>.()
22:05 <+p6eval> rakudo 29f5cf: OUTPUT«2 4»
22:05 < [Coke]> rakudo: say ( { 1 + 1 }, { 2 + 2 } )>>()
22:05 <+p6eval> rakudo 29f5cf: OUTPUT«===SORRY!===Method 'isa' not found for
invocant of class 'Undef'»
The failure on the third one looks plausible, though. Is this closable with
tests?
--
Will "Coke" Coleda