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

'has' declarations and method protos can't coexist peacefully in Rakudo #1905

Closed
p6rt opened this issue Jun 30, 2010 · 5 comments
Closed

'has' declarations and method protos can't coexist peacefully in Rakudo #1905

p6rt opened this issue Jun 30, 2010 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jun 30, 2010

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

Searchable as RT76298$

@p6rt
Copy link
Author

p6rt commented Jun 30, 2010

From @masak

<masak> rakudo​: class A { has $.b; proto method b {} }
<p6eval> rakudo 806efc​: OUTPUT«===SORRY!===␤A method named 'b' already
exists in class 'A'. It may have been supplied by a role.␤»
<masak> cxreg​: that's your error, right?
<cxreg> right
<masak> I don't think I've seen this addressed in S12.
<moritz_> putting the proto first should make it work
<masak> rakudo​: class A { proto method b {}; has $.b }
<p6eval> rakudo 806efc​: OUTPUT«===SORRY!===␤A method named 'b' already
exists in class 'A'. It may have been supplied by a role.␤»
<moritz_> accessor generation doesn't honor protos. That's a bug
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Jul 29, 2010

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

@p6rt
Copy link
Author

p6rt commented Oct 8, 2011

From @coke

On Wed Jun 30 09​:21​:21 2010, masak wrote​:

<masak> rakudo​: class A { has $.b; proto method b {} }
<p6eval> rakudo 806efc​: OUTPUT«===SORRY!===␤A method named 'b'
already
exists in class 'A'. It may have been supplied by a role.␤»
<masak> cxreg​: that's your error, right?
<cxreg> right
<masak> I don't think I've seen this addressed in S12.
<moritz_> putting the proto first should make it work
<masak> rakudo​: class A { proto method b {}; has $.b }
<p6eval> rakudo 806efc​: OUTPUT«===SORRY!===␤A method named 'b'
already
exists in class 'A'. It may have been supplied by a role.␤»
<moritz_> accessor generation doesn't honor protos. That's a bug
* masak submits rakudobug

Fixed​:

16​:17 < [Coke]> rakudo​: class A { has $.b; proto method b {} }
16​:17 <+p6eval> rakudo 88c5a5​: ( no output )
16​:18 < [Coke]> rakudo​: class A { proto method b {}; has $.b }
16​:18 <+p6eval> rakudo 88c5a5​: ( no output )

Closable with tests.
--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Dec 20, 2012

From @timo

added a test case to S06-multi/proto.t in 8625fc2.

@p6rt
Copy link
Author

p6rt commented Dec 20, 2012

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

@p6rt p6rt closed this as completed Dec 20, 2012
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant