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

samewith doesn't work on subs in Rakudo #4376

Closed
p6rt opened this issue Jul 3, 2015 · 6 comments
Closed

samewith doesn't work on subs in Rakudo #4376

p6rt opened this issue Jul 3, 2015 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Jul 3, 2015

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

Searchable as RT125539$

@p6rt
Copy link
Author

p6rt commented Jul 3, 2015

From @masak

<masak> what's the idiomatic way to call a MAIN multi from another?
<japhb> masak​: nextsame?
<lizmat> masak​: samewith(...)
<tadzik> samwich()
<japhb> Oh interesting, I just directly call MAIN with the appropriate args.
* japhb wonders if that was once a backwards compat hack or something
... I've forgotten why I did it that way now.
* masak tries samewith
<masak> ooh, interesting. that fails, with "Could not find 'self'"!
<lizmat> ah, of course
<masak> of course?
<lizmat> samewith is for methods...
<masak> m​: multi MAIN() { samewith('foo') }; multi MAIN('foo') { "foo'd you!" }
<camelia> rakudo-moar 2904f3​: OUTPUT«Could not find 'self'␤ in sub MAIN [...]
<masak> how is samewith for methods?
<jnthn> I don't see why it coudln't handle subs too
<jnthn> I mean, callwith etc does
<masak> right. I was surprised about "only for methods".
<jnthn> I don't immediately see why we can't liberalize it to all routines
<masak> lizmat​: mind if I submit a rakudobug for it not working with subs?
<lizmat> I don't :-)
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Jul 5, 2015

From @lizmat

Fixed with f098e0ff6e6dd275256a91 , tests added to t/spec/S06-multi/redispatch.t

On 03 Jul 2015, at 15​:34, Carl Mäsak (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by "Carl Mäsak"
# Please include the string​: [perl #​125539]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=125539 >

<masak> what's the idiomatic way to call a MAIN multi from another?
<japhb> masak​: nextsame?
<lizmat> masak​: samewith(...)
<tadzik> samwich()
<japhb> Oh interesting, I just directly call MAIN with the appropriate args.
* japhb wonders if that was once a backwards compat hack or something
... I've forgotten why I did it that way now.
* masak tries samewith
<masak> ooh, interesting. that fails, with "Could not find 'self'"!
<lizmat> ah, of course
<masak> of course?
<lizmat> samewith is for methods...
<masak> m​: multi MAIN() { samewith('foo') }; multi MAIN('foo') { "foo'd you!" }
<camelia> rakudo-moar 2904f3​: OUTPUT«Could not find 'self'␤ in sub MAIN [...]
<masak> how is samewith for methods?
<jnthn> I don't see why it coudln't handle subs too
<jnthn> I mean, callwith etc does
<masak> right. I was surprised about "only for methods".
<jnthn> I don't immediately see why we can't liberalize it to all routines
<masak> lizmat​: mind if I submit a rakudobug for it not working with subs?
<lizmat> I don't :-)
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Jul 5, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jul 5, 2015

From @usev6

I'm closing this ticket as 'resolved', lizmat++

1 similar comment
@p6rt
Copy link
Author

p6rt commented Jul 5, 2015

From @usev6

I'm closing this ticket as 'resolved', lizmat++

@p6rt
Copy link
Author

p6rt commented Jul 5, 2015

@usev6 - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant