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

Rakudo fails on defining classes with core roles #378

Closed
p6rt opened this issue Oct 27, 2008 · 9 comments
Closed

Rakudo fails on defining classes with core roles #378

p6rt opened this issue Oct 27, 2008 · 9 comments

Comments

@p6rt
Copy link

p6rt commented Oct 27, 2008

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

Searchable as RT60176$

@p6rt
Copy link
Author

p6rt commented Oct 27, 2008

From @masak

Rakudo r32151 can't create classes with roles from the Rakudo-defined classes.

$ ./perl6 -e 'role B {}; class A does B {}' # this works

$ perl6 -e 'class A does Int {}' # this doesn't
Method 'methods' not found
[...]

Now, Int is a class in Rakudo, so I'm not 100% sure this should work.
Still, strange error message.

@p6rt
Copy link
Author

p6rt commented Nov 4, 2008

From @jnthn

On Mon Oct 27 10​:55​:52 2008, masak wrote​:

Rakudo r32151 can't create classes with roles from the Rakudo-defined
classes.

$ ./perl6 -e 'role B {}; class A does B {}' # this works

$ perl6 -e 'class A does Int {}' # this doesn't
Method 'methods' not found
[...]

Now, Int is a class in Rakudo, so I'm not 100% sure this should work.
Still, strange error message.

At the moment Int is not a Role, so I would not expect this to work. The
error message sucked, I agree - it's now as of r32335 'does keyword can
only be used with roles'. I'm not sure what to do with this ticket now -
the error message is improved. But should Int become a role? If so,
maybe we rename the ticket to do that?

Jonathan

@p6rt
Copy link
Author

p6rt commented Nov 4, 2008

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

@p6rt
Copy link
Author

p6rt commented Nov 4, 2008

From @chromatic

On Tuesday 04 November 2008 09​:05​:13 jnthn@​jnthn.net via RT wrote​:

On Mon Oct 27 10​:55​:52 2008, masak wrote​:

Rakudo r32151 can't create classes with roles from the Rakudo-defined
classes.

$ ./perl6 -e 'role B {}; class A does B {}' # this works

$ perl6 -e 'class A does Int {}' # this doesn't
Method 'methods' not found
[...]

Now, Int is a class in Rakudo, so I'm not 100% sure this should work.
Still, strange error message.

At the moment Int is not a Role, so I would not expect this to work. The
error message sucked, I agree - it's now as of r32335 'does keyword can
only be used with roles'. I'm not sure what to do with this ticket now -
the error message is improved. But should Int become a role? If so,
maybe we rename the ticket to do that?

Every Class implies the existence of a Role. Rakudo may not do that now, but
it should do that in the future *even if* Int remains a Class.

-- c

@p6rt
Copy link
Author

p6rt commented Apr 27, 2009

From @masak

On Tue Nov 04 09​:05​:10 2008, jnthn@​jnthn.net wrote​:

On Mon Oct 27 10​:55​:52 2008, masak wrote​:

Rakudo r32151 can't create classes with roles from the Rakudo-defined
classes.

$ ./perl6 -e 'role B {}; class A does B {}' # this works

$ perl6 -e 'class A does Int {}' # this doesn't
Method 'methods' not found
[...]

Now, Int is a class in Rakudo, so I'm not 100% sure this should work.
Still, strange error message.

At the moment Int is not a Role, so I would not expect this to work. The
error message sucked, I agree - it's now as of r32335 'does keyword can
only be used with roles'.

In 7bbc62a, the error message sucks again -- it's "Method '!select' not
found for invocant of class ''".

@p6rt
Copy link
Author

p6rt commented Jul 10, 2009

From @kyleha

This is an automatically generated mail to inform you that tests are now available in b/t/spec/S14-roles/basic.t

@p6rt
Copy link
Author

p6rt commented Mar 21, 2010

From @ShimmerFairy

The error message is currently​:
Method 'postcircumfix​:<[ ]>' not found for invocant of class ''
--
Don't Panic!

@p6rt
Copy link
Author

p6rt commented Feb 20, 2011

From @moritz

The spec doesn't mention that classes imply existence of roles, and the
current error message is about as good as it can get. So, closing ticket.

@p6rt
Copy link
Author

p6rt commented Feb 20, 2011

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

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