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 composing a stubbed role into a class in Rakudo #3227

Closed
p6rt opened this issue Sep 6, 2013 · 7 comments
Closed

Null PMC access when composing a stubbed role into a class in Rakudo #3227

p6rt opened this issue Sep 6, 2013 · 7 comments

Comments

@p6rt
Copy link

p6rt commented Sep 6, 2013

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

Searchable as RT119643$

@p6rt
Copy link
Author

p6rt commented Mar 14, 2013

From @masak

<diakopter> r​: role F { ... }; class G does F { }
<p6eval> rakudo 1c9939​: OUTPUT«===SORRY!===␤None of the parametric
role variants for 'F' matched the arguments supplied.␤Cannot call '';
none of these signatures match​:␤␤»
* masak submits rakudobug for 'G does F'
<jnthn> That G does F one is...hm
<jnthn> Vaguely accurate in so far as the role isn't considered
declared until you're further one.
<masak> jnthn​: I don't understand. is it because of the '...' ?
<jnthn> masak​: Yeah. But a bunch of those almost certianly wnat to so
"no, you can't do a stubbed role"

@p6rt
Copy link
Author

p6rt commented Sep 6, 2013

From @masak

<lizmat> r​: my role Foo { ... }; class A does Foo {} # seems we can't
compose with a stubbed role
<camelia> rakudo 044bd5​: OUTPUT«===SORRY!===␤None of the parametric
role variants for 'Foo' matched the arguments supplied.␤Null PMC
access in get_pmc_keyed()␤»
* masak submits rakudobug

Two things​:

(a) the Null PMC access
(b) the error message not being very descriptive as to what's wrong

@p6rt
Copy link
Author

p6rt commented Sep 25, 2013

From @jnthn

On Fri Sep 06 07​:35​:10 2013, masak wrote​:

<lizmat> r​: my role Foo { ... }; class A does Foo {} # seems we can't
compose with a stubbed role
<camelia> rakudo 044bd5​: OUTPUT«===SORRY!===␤None of the parametric
role variants for 'Foo' matched the arguments supplied.␤Null PMC
access in get_pmc_keyed()␤»
* masak submits rakudobug

Two things​:

(a) the Null PMC access
(b) the error message not being very descriptive as to what's wrong

The Null PMC access is fixed now​:

perl6.exe -Ilib -e "my role Foo { ... }; class A does Foo {}"
===SORRY!===
None of the parametric role variants for 'Foo' matched the arguments
supplied.
Cannot call ''; none of these signatures match​:

However, we may want to try and get a better message here.

/jnthn

@p6rt
Copy link
Author

p6rt commented Sep 25, 2013

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

@p6rt
Copy link
Author

p6rt commented Feb 8, 2015

From @usev6

This dies now with a typed exception X​::Role​::Parametric​::NoSuchCandidate and a descriptive error message (IMHO)​:

$ perl6 -e 'my role Foo { ... }; class A does Foo {}'
===SORRY!===
No appropriate parametric role variant available for 'Foo'

I added a test to S14-roles/stubs.t with commit Raku/roast@62633d4987

I'm closing this ticket now. (And I'll merge ticket 117169 since it's a duplicate.)

1 similar comment
@p6rt
Copy link
Author

p6rt commented Feb 8, 2015

From @usev6

This dies now with a typed exception X​::Role​::Parametric​::NoSuchCandidate and a descriptive error message (IMHO)​:

$ perl6 -e 'my role Foo { ... }; class A does Foo {}'
===SORRY!===
No appropriate parametric role variant available for 'Foo'

I added a test to S14-roles/stubs.t with commit Raku/roast@62633d4987

I'm closing this ticket now. (And I'll merge ticket 117169 since it's a duplicate.)

@p6rt
Copy link
Author

p6rt commented Feb 8, 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