No, I think it's doing the right thing. To say "$x equals 1 if it's defined, otherwise a whatever object," I think you need to say:
$x = 1 // {*}.() Which is a bit ugly, but then Whatever isn't really meant to be used that way. Amusingly it does work: ./perl6 -e 'my $x = Mu // {*}.(); for 1 ... $x -> $i { say $i }' prints the positive integers. On Mon, Aug 9, 2010 at 5:32 PM, Carl Mäsak via RT < perl6-bugs-follo...@perl.org> wrote: > On Mon Aug 09 06:44:14 2010, pawel.pab...@implix.com wrote: > > [15:38] <bbkr> rakudo: my $x = 1 // *; $x.WHAT.say > > [15:38] <p6eval> rakudo c1e19a: OUTPUT«WhateverCode()» > > > > > > "1" is expected because it's first defined value in assignment. > > Is there something that makes the C<//> operator be treated specially, so > that using it along with > C<*> doesn't create a thunk/WhateverCode object? I'm not sure there is, at > least not in the spec. > Maybe there should be, but I'm not sure of that either. > -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs