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

.WHAT is treated as a method in Rakudo, not as a macro #445

Closed
p6rt opened this issue Dec 2, 2008 · 5 comments
Closed

.WHAT is treated as a method in Rakudo, not as a macro #445

p6rt opened this issue Dec 2, 2008 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Dec 2, 2008

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

Searchable as RT60992$

@p6rt
Copy link
Author

p6rt commented Dec 2, 2008

From @masak

<masak> rakudo​: class A { method WHAT { "B" } }; A.new.WHAT.say
<p6eval> rakudo 33440​: OUTPUT[B␤]
* masak cackles evilly
<pmichaud> we don't handle .WHAT properly yet.
<masak> pmichaud​: but that is correct! :)
<pmichaud> masak​: no, it's actually wrong.
<pmichaud> A.new.WHAT.say # 'A'
<pmichaud> A.new.'WHAT'.say # 'B'
<masak> pmichaud​: WHAT? :)
<masak> pmichaud​: I just redefined .WHAT, shouldn't Perl 6 let me do that?
<ruoso> masak, .WHAT is a macro
<pmichaud> yes, but to access that method you have to use ."WHAT"
<masak> aha.
<pmichaud> because... what ruoso said.
* masak had forgotten that
* masak files rakudobug, then

@p6rt
Copy link
Author

p6rt commented Jul 1, 2009

From @kyleha

There's a test for this in S12-methods/what.t added here​:

r20798 | Auzon | 2008-06-14 00​:18​:34 -0500 (Sat, 14 Jun 2008)

@p6rt
Copy link
Author

p6rt commented Jul 28, 2010

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

@p6rt
Copy link
Author

p6rt commented Sep 30, 2011

From @moritz

It is a macro now, tests pass.

@p6rt
Copy link
Author

p6rt commented Sep 30, 2011

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

@p6rt p6rt closed this as completed Sep 30, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant