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

'self' is writable in Rakudo #1477

Closed
p6rt opened this issue Jan 22, 2010 · 5 comments
Closed

'self' is writable in Rakudo #1477

p6rt opened this issue Jan 22, 2010 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jan 22, 2010

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

Searchable as RT72286$

@p6rt
Copy link
Author

p6rt commented Jan 22, 2010

From @masak

This be Rakudo db84bc on Parrot r43174.

$ perl6 -e 'class A { method foo() { self = 5 } }; my A $a = A.new;
$a.foo; say $a; say $a.WHAT'
5
Int()

I'm not sure 'self' should be a writable lvalue in the first place.
But if it's supposed to be, I'd still think that the above ought to be
disallowed for some reason. Note that the above manages to sneak an
Int into variable typed to only contain A objects.

@p6rt
Copy link
Author

p6rt commented Feb 27, 2010

From @pmichaud

In the new master branch, self is no longer writable. I don't know if
we need a test for this ticket before closing it (I suspect we do).

Pm

@p6rt
Copy link
Author

p6rt commented Feb 27, 2010

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Feb 28, 2010

From @moritz

now tested in S12-class/basic.t.

@p6rt
Copy link
Author

p6rt commented Feb 28, 2010

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

@p6rt p6rt closed this as completed Feb 28, 2010
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant