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

The type of a named method declaration is Code, not Method, in Rakudo #1703

Closed
p6rt opened this issue Apr 19, 2010 · 3 comments
Closed

The type of a named method declaration is Code, not Method, in Rakudo #1703

p6rt opened this issue Apr 19, 2010 · 3 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Apr 19, 2010

Migrated from rt.perl.org#74490 (status was 'resolved')

Searchable as RT74490$

@p6rt
Copy link
Author

p6rt commented Apr 19, 2010

From @masak

<moritz_> rakudo​: class A { say (method foo { 23 }).WHAT };
<p6eval> rakudo 538606​: OUTPUT«Code()␤»
<moritz_> rakudo​: class A { say (method foo { 23 }) ~~ Routine };
<p6eval> rakudo 538606​: OUTPUT«0␤»
<moritz_> I'm pretty sure that's wrong
<masak> rakudo​: say (method { 23 }).WHAT
<p6eval> rakudo 538606​: OUTPUT«Method()␤»
<masak> o.O
<masak> so... an anon method gets to be a Method.
<masak> but a named method is just Code?
<moritz_> that's just weird and wrong :-)
* masak submits rakudobug
<moritz_> you know, if it's not ~~ Routine, then return() should pass
through its boundaries
<masak> aye.
<jnthn> Yes, "just Code" is wrong
<jnthn> (I know why we get that one wrong, though)

@p6rt
Copy link
Author

p6rt commented Oct 1, 2011

From @moritz

Works now, and tested in t/spec/S12-methods/instance.t

@p6rt
Copy link
Author

p6rt commented Oct 1, 2011

@moritz - Status changed from 'new' to 'resolved'

@p6rt p6rt closed this as completed Oct 1, 2011
@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