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
Attributes can't be declared inside of a BEGIN eval in Rakudo #2543
Comments
From @masak<moritz> nom: class A { eval 'has $.x' }; say A.new(x => 3).x |
From @cokeOn Sat Oct 29 13:09:29 2011, masak wrote:
Behavior has changed a bit. This now gives an awesome error and can be closed with tests: 03:16 < [Coke]> nom: has $.x However, the examples from earlier now give errors about non-rakudo objects, or methods we weren't asking about, e.g.: 03:16 < [Coke]> nom: class A { BEGIN EVAL 'has $.x' }; say A.new(x => 3).x -- |
The RT System itself - Status changed from 'new' to 'open' |
From @usev6All of this looks good now (results are identical on Moar, Parrot and JVM): $ perl6 -e 'has $.x' $ perl6 -e 'class A { BEGIN EVAL q[has $.x] }; say A.new(x => 3).x' $ perl6-m -e 'class A { EVAL q[has $.x] }; say A.new(x => 3).x' I added tests to S12-attributes/undeclared.t and S12-attributes/class.t with commit Raku/roast@7f8180122c I'm closing this ticket now. |
1 similar comment
From @usev6All of this looks good now (results are identical on Moar, Parrot and JVM): $ perl6 -e 'has $.x' $ perl6 -e 'class A { BEGIN EVAL q[has $.x] }; say A.new(x => 3).x' $ perl6-m -e 'class A { EVAL q[has $.x] }; say A.new(x => 3).x' I added tests to S12-attributes/undeclared.t and S12-attributes/class.t with commit Raku/roast@7f8180122c I'm closing this ticket now. |
@usev6 - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#102478 (status was 'resolved')
Searchable as RT102478$
The text was updated successfully, but these errors were encountered: