Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interaction between multi dispatch and MRO favors only the former in Rakudo #2232

Closed
p6rt opened this issue Oct 26, 2010 · 3 comments
Closed
Labels

Comments

@p6rt
Copy link

p6rt commented Oct 26, 2010

Migrated from rt.perl.org#78576 (status was 'rejected')

Searchable as RT78576$

@p6rt
Copy link
Author

p6rt commented Oct 26, 2010

From @masak

<masak> rakudo​: class A { multi method foo(Int) { say "A​: Int";
nextsame }; multi method foo($) { say "A​: Any" } }; class B is A {
multi method foo(Int) { say "B​: Int"; nextsame }; multi method foo($)
{ say "B​: Any" } }; B.new.foo(42)
<p6eval> rakudo d49eea​: OUTPUT«B​: Int␤B​: Any␤»
<masak> that's the first result that confuses me.
<masak> where'd the A methods go?
* masak submits rakudobug
<masak> rakudobugs are such a win-win proposition. :) when I see a
behavior I don't understand, I can submit a bug ticket. either it gets
fixed, or someone explains to me why I'm wrong. :)

@p6rt
Copy link
Author

p6rt commented Oct 26, 2010

From @masak

On Tue Oct 26 08​:00​:21 2010, masak wrote​:

<masak> rakudo​: class A { multi method foo(Int) { say "A​: Int";
nextsame }; multi method foo($) { say "A​: Any" } }; class B is A {
multi method foo(Int) { say "B​: Int"; nextsame }; multi method foo($)
{ say "B​: Any" } }; B.new.foo(42)
<p6eval> rakudo d49eea​: OUTPUT«B​: Int␤B​: Any␤»
<masak> that's the first result that confuses me.
<masak> where'd the A methods go?
* masak submits rakudobug
<masak> rakudobugs are such a win-win proposition. :) when I see a
behavior I don't understand, I can submit a bug ticket. either it gets
fixed, or someone explains to me why I'm wrong. :)

<TimToady> there's no nextsame in B Any
<masak> :-/
<masak> that'd explain it...
<pmichaud> I agree; I don't see a nextsame in B Any or A Any
* masak rejects ticket
<masak> rakudo​: class A { multi method foo(Int) { say "A​: Int"; nextsame }; multi method foo($)
{ say "A​: Any" } }; class B is A { multi method foo(Int) { say "B​: Int"; nextsame }; multi method
foo($) { say "B​: Any"; nextsame } }; B.new.foo(42)
<p6eval> rakudo d49eea​: OUTPUT«B​: Int␤B​: Any␤A​: Int␤A​: Any␤»
<masak> \o/
<pmichaud> \o/
<pmichaud> jnthn++
<masak> jnthn++

@p6rt
Copy link
Author

p6rt commented Oct 26, 2010

@masak - Status changed from 'new' to 'rejected'

@p6rt p6rt closed this as completed Oct 26, 2010
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant