On Mon Jul 27 08:11:54 2009, masak wrote:
> <masak> rakudo: sub foo(&foo = &foo) { say "OH HAI"; foo }; foo
> <p6eval> rakudo 4c31fb: OUTPUT«Null PMC access in isa()␤in sub foo [...]
> <hoelzro> pmichaud: it should just alert you
> <masak> hah!
> * masak submits rakudobug
> <masak> rakudo: sub foo(&foo = &foo) {}; foo
> <p6eval> rakudo 4c31fb: OUTPUT«Null PMC access in isa()␤in sub foo [...]
> <moritz_> rakudo: sub foo(&foo = &foo) {};
> <p6eval> rakudo 4c31fb:  ( no output )
> <moritz_> ah, happens while calling
> <masak> aye.
> <KyleHa> Is that supposed to live?
> <masak> I think so.
> <masak> KyleHa: the first &foo is the param, the second is the sub.

It now lives:

00:30 <@jnthn> rakudo: sub foo(&foo = &foo) {}; foo
00:30 <+p6eval> rakudo 346e76:  ( no output )

Since the &foo inside the sub is a new lexical variable, you essentially
end up doing like my $a = $a which is fine but useless...

00:30 <@jnthn> rakudo: sub foo(&foo = &foo) {say &foo}; foo
00:30 <+p6eval> rakudo 346e76: OUTPUT«Any()␤»

Anyway, it's what I'd expect. Giving to moritz++ for spectest.

Thanks,

Jonathan

Reply via email to