In Perl5, if I do:

 sub foo {return 1}
 sub foo {return 2}
 print foo();

I get a redefinition error, and a '2' on STDOUT. Can I assume this will
be the same in Perl6? i.e. can I write a test for pugs to check this?

Moreover:

 sub foo(Num $a) {return 1}
 sub foo(Str $a) {return 2}
 print foo(1),foo('a');

should have the same effect? Printing 2 twice? I don't expect MMD on
non-multi subs.

--
        Dakkar - <Mobilis in mobile>
        GPG public key fingerprint = A071 E618 DD2C 5901 9574
                                     6FE2 40EA 9883 7519 3F88
                            key id = 0x75193F88

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to