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

LTA error message when trying to declare a class over a role in Rakudo #3284

Closed
p6rt opened this issue Nov 29, 2013 · 6 comments
Closed

LTA error message when trying to declare a class over a role in Rakudo #3284

p6rt opened this issue Nov 29, 2013 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Nov 29, 2013

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

Searchable as RT120646$

@p6rt
Copy link
Author

p6rt commented Mar 14, 2013

From @masak

<diakopter> r​: role F { ... }; class F does F { }
<p6eval> rakudo 1c9939​: OUTPUT«===SORRY!===␤Method 'is_composed' not
found for invocant of class
'Perl6​::Metamodel​::ParametricRoleGroupHOW'␤»
* masak submits rakudobug for 'F does F'

@p6rt
Copy link
Author

p6rt commented Nov 29, 2013

From @masak

<masak> r​: role Foo {}; class Foo {} # most definitely LTA error
message -- via lizmat++
<camelia> rakudo-parrot e5fd34, rakudo-jvm e5fd34​:
OUTPUT«===SORRY!===␤No such method 'is_composed' for invocant of type
'Perl6​::Metamodel​::ParametricRoleGroupHOW'␤»
* masak submits rakudobug
<moritz> oh, I think I know what's going on
<moritz> because roles are multi, there's no redeclaration error
<moritz> though there should be one, because the second defintion is not a role
<jnthn> I think it's actually detected that it's looking at a re-decl
and is then trying to establish if the thing is a stub or not
<jnthn> Since is_composed is the way to detect that
<jnthn> But yeah, needs to check if the object *can* is_composed
before actually calling it.

@p6rt
Copy link
Author

p6rt commented Aug 9, 2015

From @skids

This seems to be fixed now, and tests are added in S14-roles/basic.t

  1..3
  ok 1 - 'role RR { }; class RR { };' died
  ok 2 - right exception type (X​::Redeclaration)
  ok 3 - .symbol matches RR
ok 37 - did we throws-like X​::Redeclaration?
  1..3
  ok 1 - 'role RRR { }; class RRR does RRR { };' died
  ok 2 - right exception type (X​::Redeclaration)
  ok 3 - .symbol matches RRR
ok 38 - did we throws-like X​::Redeclaration?

@p6rt
Copy link
Author

p6rt commented Aug 9, 2015

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

@p6rt
Copy link
Author

p6rt commented Aug 13, 2015

From @usev6

On Sun Aug 09 14​:05​:27 2015, bri@​abrij.org wrote​:

This seems to be fixed now, and tests are added in S14-roles/basic.t

1\.\.3
ok 1 \- 'role RR \{ \}; class RR \{ \};' died
ok 2 \- right exception type \(X&#8203;::Redeclaration\)
ok 3 \- \.symbol matches RR

ok 37 - did we throws-like X​::Redeclaration?
1..3
ok 1 - 'role RRR { }; class RRR does RRR { };' died
ok 2 - right exception type (X​::Redeclaration)
ok 3 - .symbol matches RRR
ok 38 - did we throws-like X​::Redeclaration?

Great. I'm closing this ticket as 'resolved'.

@p6rt p6rt closed this as completed Aug 13, 2015
@p6rt
Copy link
Author

p6rt commented Aug 13, 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