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
Class attributes without accessors don't work in Rakudo #334
Comments
From @masakr30188: Not sure if the error message from Pugs is right either. Should it be |
From @chromaticOn Tuesday 12 August 2008 14:17:22 Carl Mäsak wrote:
This is another double-free abort like the one in RT #57710. The fix is -- c |
The RT System itself - Status changed from 'new' to 'open' |
From @masakRakudo r31286 doesn't seem to recognize class attributes with the '!' twigil. $ ./perl6 -e 'class A { my $ ./perl6 -e 'class A { my $ ./perl6 -e 'class A { my |
From @moritzOn Sat Sep 20 05:20:28 2008, masak wrote:
We have a lack of OO tests in t/spec/, mostly because I don't understand So anybody with some understanding of Perl 6 OO, please help to increase Moritz |
The RT System itself - Status changed from 'new' to 'open' |
From @pmichaudOn Tue Aug 12 14:17:20 2008, masak wrote:
Since $.x is really equivalent to self.x, I suspect that Rakudo and Pugs AFAIK, statements are definitely allowed in method and class declaration Pm |
From @masakPatrick (>), Carl (>>):
It's funny that this bug resurfaces just as I try something like this in Rakudo: class SomeClass { # ... And have it fail. Were my assumptions unreasonable in the above case? I'll re-pose this question to p6l. // Carl |
From @UtilConsider these two classes, both faulty in the same way: Each class makes reference to a attribute that has not been declared, $ ./perl6 -e 'class Chef { say $.b }; say "Done";' Either class, when evaled solo, behaves as expected. Execution $ ./perl6 -e 'eval q[ class Chef { say $.b; }; ]; say "Done";' $ ./perl6 -e 'eval q[ class B0rk { say $ ./perl6 -e 'eval q[ class Chef { say All is working as expected, when the classes are evaled in isolation Evaling the classes together produces two different unexpected Next, we eval both classes in the same program, but in separate eval Notice that in both of the last cases, "Done" *did* print, so neither -- |
From @moritzThanks for the ticket, it's a very good catch and analysis. Bruce Gray (via RT) wrote:
And it's quite curious that the "Done" is printed before the error message.
The back trace at exit is a known parrot problem, the so-called It's the same problem that makes rakudo fail on exit on the test file Cheers, |
The RT System itself - Status changed from 'new' to 'open' |
From @masak<masak> std: my Any %.x=3,%.x; In my opinion, it should give an error already at the wonky declaration. |
From @ShimmerFairyclass A { has this works. |
From @masakOn Sun Mar 21 14:33:26 2010, lue wrote:
Sure, but that doesn't create a class attribute, as was the topic of this |
From @jnthnCarl Mäsak via RT wrote:
AFAIK, it's just syntactic sugar for declaring a lexical variable and Jonathan |
From @masaklue (>>>), Carl (>>), Jonathan (>):
It's a bit weak, but S12:711 seems to contradict that: my %!cache is rw; # generates no public accessor In my opinion, if the class attribute has a C<.> or C<!> twigil, there // Carl |
@coke - Status changed from 'new' to 'open' |
From @colomoncolomon: rakudo: class A { has -- |
From @cokeOn Wed Sep 16 02:56:54 2009, moritz wrote:
Failure mode changed, and is now more consistent, but worse. $ ./perl6 -e 'class B0rk { say $.a };' $ ./perl6 -e 'class Chef { say $.b };' -- |
From @cokeOn Tue Aug 12 14:17:20 2008, masak wrote:
This currently generates a Null PMC access error. $ ./perl6 -e 'class A { my -- |
From @masak<[Coke]> nom: my %a = { $.idattr => 3 }; say %a.perl |
From @cokeOn Tue Mar 02 10:38:41 2010, masak wrote:
Now includes a NULL PMC error: 09:09 < [Coke]> rakudo: my Any %.x=3,%.x; #RT #73232 -- |
From @jnthnOn Mon Jan 30 11:15:17 2012, masak wrote:
Now:
Tagging testneeded. /jnthn |
The RT System itself - Status changed from 'new' to 'open' |
From @jnthnOn Tue Apr 26 05:31:57 2011, Solomon wrote:
Now it gives a much more informative error at compile time:
Tagging testneeded. /jnthn |
The RT System itself - Status changed from 'new' to 'open' |
From @masakmasak (>>), coke (>):
<masak> r: class A { my |
From @moritzCurrent state: ===SORRY!=== |
From @diakopterOn Wed Feb 01 06:10:15 2012, coke wrote:
now does the right thing (matches STD). marking testneeded. 15:18 <diakopter> std: my Any %.x=3,%.x; |
From @diakopterOn Mon Sep 19 17:46:17 2011, coke wrote:
works now, testneeded. duplicate of another 1 or 2 tickets though. 16:09 <diakopter> r: class B0rk { say $.a }; |
From @moritzNow tested in S32-exceptions/misc.t |
@moritz - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#59118 (status was 'resolved')
Searchable as RT59118$
The text was updated successfully, but these errors were encountered: