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

Can't 'is rw' multiply declared has attributes in Rakudo (but works in STD) #3482

Closed
p6rt opened this issue Aug 15, 2014 · 6 comments
Closed

Comments

@p6rt
Copy link

p6rt commented Aug 15, 2014

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

Searchable as RT122543$

@p6rt
Copy link
Author

p6rt commented Aug 15, 2014

From @masak

<masak> std​: class C { has ($.x, $.y) is rw; }
<camelia> std 81e0d07​: OUTPUT«ok 00​:01 125m␤»
<masak> m​: class C { has ($.x, $.y) is rw; }
<camelia> rakudo-moar 287e49​: OUTPUT«===SORRY!=== Error while
compiling /tmp/OCu5FIHkCz␤Two terms in a row [...]
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Jan 1, 2015

From @usev6

I added a test for this to S12-attributes/instance.t with commit Raku/roast@67d36ed7db

AFAIU the problem stems from ($.x, $.y) being (parsed as) a signature. Even with one attribute the same failure occurs​:

$ ./perl6-m -e 'class C { has ($.x) is rw; }'
===SORRY!=== Error while compiling -e
Two terms in a row
at -e​:1
------> class C { has ($.x) ⏏is rw; }
  expecting any of​:
  postfix
  infix stopper
  infix or meta-infix
  statement end
  statement modifier
  statement modifier loop

1 similar comment
@p6rt
Copy link
Author

p6rt commented Jan 1, 2015

From @usev6

I added a test for this to S12-attributes/instance.t with commit Raku/roast@67d36ed7db

AFAIU the problem stems from ($.x, $.y) being (parsed as) a signature. Even with one attribute the same failure occurs​:

$ ./perl6-m -e 'class C { has ($.x) is rw; }'
===SORRY!=== Error while compiling -e
Two terms in a row
at -e​:1
------> class C { has ($.x) ⏏is rw; }
  expecting any of​:
  postfix
  infix stopper
  infix or meta-infix
  statement end
  statement modifier
  statement modifier loop

@p6rt
Copy link
Author

p6rt commented Jan 1, 2015

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

@p6rt
Copy link
Author

p6rt commented Mar 3, 2015

From @coke

On Thu Jan 01 12​:30​:29 2015, bartolin@​gmx.de wrote​:

I added a test for this to S12-attributes/instance.t with commit
Raku/roast@67d36ed7db

AFAIU the problem stems from ($.x, $.y) being (parsed as) a signature.
Even with one attribute the same failure occurs​:

$ ./perl6-m -e 'class C { has ($.x) is rw; }'
===SORRY!=== Error while compiling -e
Two terms in a row
at -e​:1
------> class C { has ($.x) ⏏is rw; }
expecting any of​:
postfix
infix stopper
infix or meta-infix
statement end
statement modifier
statement modifier loop

This test is now unfudged. Closing ticket.
--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Mar 3, 2015

@coke - 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