On Tue, Aug 28, 2012 at 09:15:41AM -0400, yary wrote:
> I'm a little confused by this report. The two code snippets are
> exactly the same- I checked with "diff". Does the same code have
> different results with different runs, or is there a copy/paste error?
> Also is the space between the brackets in "class B{ }" significant
> (the other two empty bracket pairs have no space)?

There is in fact a copy-paste error.  Here's the original, notice the changing
signature of &g:

sorear$ ./install/bin/perl6
> { my class A {}; my class B { }; my class C is B is A {}; multi f(A) { "A" }; 
> multi f(B) { "B" }; sub g(A $x) { say f($x) }; g(C.new); }
A
> { my class A {}; my class B { }; my class C is B is A {}; multi f(A) { "A" }; 
> multi f(B) { "B" }; sub g(B $x) { say f($x) }; g(C.new); }
B

-Stefan

Attachment: pgpPorFyuxvM2.pgp
Description: PGP signature

Reply via email to