On Sat, Aug 14, 2010 at 10:55:57AM -0700, James Keenan wrote:
> FAILS:
> 
> use v6;
> 
> sub orderbeer($type, $pints) {
>      say ($pints == 1 ?? 'A pint' !! "$pints pints") ~ " of $type,  
> please.";
> }
> 
> orderbeer('Hobgoblin', 1);

The problem here is that Rakudo is mis-interpreting the "or" that
follows the sub as being an infix:<or>, at which point it gets confused.
In other words, the expression parser doesn't yet recognize the
closing brace as being the end of a statement.

Anyway, it's definitely a bug in Rakudo, and I'll try to fix it soon.

Pm

Reply via email to