By my reading, it really is an error, not valid code. The infix:<,> is looser than the ternary, as you say, so without parens, it parses as:
(1 ?? 1),(2 !! 3),4 I agree, however, that this shouldn't die. I've added a test for this in t/spec/S03-operators/ternary.t Thanks. Kyle. On Mon, Jun 22, 2009 at 1:57 AM, Hojung Yoon <perl6-bugs-follo...@perl.org>wrote: > # New Ticket Created by Hojung Yoon > # Please include the string: [perl #66840] > # in the subject line of all future correspondence about this issue. > # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=66840 > > > > at revision: 1b06df80900096dab8a9f74467f504f73a6115dd > and also at release #18. > > : bash$ perl6 > : > 1 ?? 2 !! 3 > : > 1 ?? (1,2) !! (3,4) > : > 1 ?? 1,2 !! 3,4 > : Ternary error > : bash$ > > this is not wrong as infix:<,> has looser precedence than the ternary > operator( ?? !! ) > but when ternary error occurs, the program emits the error and dies. > > should provide the proper error message and not die. >