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

Null PMC access when calling *any* method on a multi sub in Rakudo #731

Closed
p6rt opened this issue Mar 1, 2009 · 7 comments
Closed

Null PMC access when calling *any* method on a multi sub in Rakudo #731

p6rt opened this issue Mar 1, 2009 · 7 comments

Comments

@p6rt
Copy link

p6rt commented Mar 1, 2009

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

Searchable as RT63568$

@p6rt
Copy link
Author

p6rt commented Mar 1, 2009

From @masak

<szabgab> oh and is arity defined on multi subs ?
<szabgab> rakudo​: sub f($z) {}; &f.arity.say
<p6eval> rakudo af4b73​: OUTPUT«1␤»
<szabgab> rakudo​: multi sub f($z) {}; &f.arity.say
<p6eval> rakudo af4b73​: OUTPUT«Null PMC access in find_method()␤ [...]
* masak submits rakudobug
<masak> szabgab++

@p6rt
Copy link
Author

p6rt commented Mar 1, 2009

From @masak

Also .signature on multis​:

<szabgab> rakudo​: sub f($z) {}; &f.signature.perl.say
<p6eval> rakudo af4b73​: OUTPUT«​:(Any $z)␤»
<szabgab> rakudo​: multi sub f($z) {}; &f.signature.perl.say
<p6eval> rakudo af4b73​: OUTPUT«Null PMC access in find_method() [...]

@p6rt
Copy link
Author

p6rt commented Mar 1, 2009

From [Unknown Contact. See original ticket]

Also .signature on multis​:

<szabgab> rakudo​: sub f($z) {}; &f.signature.perl.say
<p6eval> rakudo af4b73​: OUTPUT«​:(Any $z)␤»
<szabgab> rakudo​: multi sub f($z) {}; &f.signature.perl.say
<p6eval> rakudo af4b73​: OUTPUT«Null PMC access in find_method() [...]

@p6rt
Copy link
Author

p6rt commented Mar 1, 2009

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

@p6rt
Copy link
Author

p6rt commented Mar 10, 2009

From @moritz

On Sun Mar 01 02​:44​:17 2009, masak wrote​:

<szabgab> oh and is arity defined on multi subs ?
<szabgab> rakudo​: sub f($z) {}; &f.arity.say
<p6eval> rakudo af4b73​: OUTPUT«1␤»
<szabgab> rakudo​: multi sub f($z) {}; &f.arity.say
<p6eval> rakudo af4b73​: OUTPUT«Null PMC access in find_method()␤ [...]
* masak submits rakudobug
<masak> szabgab++

Actually calling *any* method on &f gives the Null PMC access, if f() is
a multi​:

./perl6 -e 'multi f { ... }; say &f.WHAT'
Null PMC access in find_method()

Cheers,
Moritz

@p6rt
Copy link
Author

p6rt commented Mar 13, 2009

From @jnthn

On Tue Mar 10 13​:45​:27 2009, moritz wrote​:

On Sun Mar 01 02​:44​:17 2009, masak wrote​:

<szabgab> oh and is arity defined on multi subs ?
<szabgab> rakudo​: sub f($z) {}; &f.arity.say
<p6eval> rakudo af4b73​: OUTPUT«1␤»
<szabgab> rakudo​: multi sub f($z) {}; &f.arity.say
<p6eval> rakudo af4b73​: OUTPUT«Null PMC access in find_method()␤ [...]
* masak submits rakudobug
<masak> szabgab++

Actually calling *any* method on &f gives the Null PMC access, if f() is
a multi​:

./perl6 -e 'multi f { ... }; say &f.WHAT'
Null PMC access in find_method()

Fixed this somewhat. Notes​:

* .WHAT now reports Multi and this is spectest'd.
* .candidates can be called to get the set of candidates. You can then
use .signature and .arity on those (.candidates is not quite spec yet,
but probably fine and reasonable to go in to the spec - someone has
agreed to do that in the next day or so)
* .signature and .arity for now are not defined on Multi - it's not
spec'd and I'm not so sure exactly what it'd do, though an any junction
seems easiest. But maybe better to make people write
any(&foo.candidates).signature to get that (this produces an any
junction of signatures).

See 76b2652.

Thanks,

Jonathan

@p6rt
Copy link
Author

p6rt commented Mar 13, 2009

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

@p6rt p6rt closed this as completed Mar 13, 2009
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant