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

Class creation should give the class back as a value, not a Code in Rakudo #1898

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

Comments

@p6rt
Copy link

p6rt commented Jun 29, 2010

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

Searchable as RT76270$

@p6rt
Copy link
Author

p6rt commented Jun 29, 2010

From @masak

<masak> on the REPL, when I write 'role R {}', it prints 'R()'. but
when I do 'class C {}', it prints '!class_init_36'. I'm guessing
there's a metamodel explanation for that, but it feels Less Than
Pretty.
<pmichaud> I'm guessing the class code is returning the closure
instead of the class. That's likely a bug.
<moritz_> rakudo​: my $x = class C { }; say $x.WHAT
<p6eval> rakudo 1576d4​: OUTPUT«Code()␤»
<moritz_> there you go
<pmichaud> yes, exactly.
<moritz_> same bug without REPL
* 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 11, 2011

From @coke

On Tue Jun 29 07​:01​:09 2010, masak wrote​:

<masak> on the REPL, when I write 'role R {}', it prints 'R()'. but
when I do 'class C {}', it prints '!class_init_36'. I'm guessing
there's a metamodel explanation for that, but it feels Less Than
Pretty.
<pmichaud> I'm guessing the class code is returning the closure
instead of the class. That's likely a bug.
<moritz_> rakudo​: my $x = class C { }; say $x.WHAT
<p6eval> rakudo 1576d4​: OUTPUT«Code()␤»
<moritz_> there you go
<pmichaud> yes, exactly.
<moritz_> same bug without REPL
* masak submits rakudobug

Fixed​:

role R {}
R()
class C {}
C()

Closable with tests.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Oct 20, 2011

From @moritz

Now tested in S12-class/basic.t

@p6rt
Copy link
Author

p6rt commented Oct 20, 2011

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