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

Cannot change native role attribute from consuming class #4565

Open
p6rt opened this issue Sep 20, 2015 · 3 comments
Open

Cannot change native role attribute from consuming class #4565

p6rt opened this issue Sep 20, 2015 · 3 comments

Comments

@p6rt
Copy link

p6rt commented Sep 20, 2015

Migrated from rt.perl.org#126120 (status was 'open')

Searchable as RT126120$

@p6rt
Copy link
Author

p6rt commented Sep 20, 2015

From @lizmat

[19​:22​:03] <lizmat> m​: role R { has int $!a }; class A does R { method a() { $!a = 42 } }; say A.new.a # sigh
[19​:22​:03] <+camelia> rakudo-moar 97e47a​: OUTPUT«Cannot assign to an immutable value␤ in method a at /tmp/xjfoxVcXDh​:1␤ in block <unit> at /tmp/xjfoxVcXDh​:1␤␤»
[19​:22​:25] <lizmat> m​: role R { has Int $!a }; class A does R { method a() { $!a = 42 } }; say A.new.a # works fine if it is not a native
[19​:22​:25] <+camelia> rakudo-moar 97e47a​: OUTPUT«42␤»

@p6rt
Copy link
Author

p6rt commented Dec 3, 2017

From @AlexDaniel

Still reproducible (2017.11,HEAD(e5b660e))

On 2015-09-20 10​:34​:34, elizabeth wrote​:

[19​:22​:03] <lizmat> m​: role R { has int $!a }; class A does R {
method a() { $!a = 42 } }; say A.new.a # sigh
[19​:22​:03] <+camelia> rakudo-moar 97e47a​: OUTPUT«Cannot assign to an
immutable value␤ in method a at /tmp/xjfoxVcXDh​:1␤ in block <unit>
at /tmp/xjfoxVcXDh​:1␤␤»
[19​:22​:25] <lizmat> m​: role R { has Int $!a }; class A does R {
method a() { $!a = 42 } }; say A.new.a # works fine if it is not a
native
[19​:22​:25] <+camelia> rakudo-moar 97e47a​: OUTPUT«42␤»

@p6rt
Copy link
Author

p6rt commented Dec 3, 2017

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

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