Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #70301] [BUG] Less-than-awesome error message when assigning to a non-lvalue in Rakudo

0 views
Skip to first unread message

Carl Mäsak

unread,
Nov 6, 2009, 4:56:51 PM11/6/09
to bugs-bi...@netlabs.develooper.com
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #70301]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=70301 >


<masak> std: "foo" ~ my $a = "bar"
<p6eval> std 29009: ok 00:02 108m␤
<masak> rakudo: "foo" ~ my $a = "bar"
<p6eval> rakudo 830e2c: Unable to set lvalue on PAST::Val node [...]
<masak> am I doing something wrong? or is Rakudo just being stubborn?
<pmichaud> rakudo stubborn
* masak submits rakudobug
<pmichaud> I think that works in ng
<masak> pmichaud: I'm sure it does. :P
<pmichaud> oh, also you might need to parenthesize there
<pmichaud> since ~ binds tighter
<masak> oh.
<pmichaud> rakudo: "foo" ~ (my $a = "bar")
<p6eval> rakudo 830e2c: ( no output )
<pmichaud> yup, that's it.
<masak> then the error from Rakudo makes more sense.
<masak> still, it's LTA.
<pmichaud> right now it's LTA in ng, too
<pmichaud> but soon it'll be "cannot assign to readonly value"
<pmichaud> which is better
<pmichaud> maybe not awesome better, but better
<masak> aye.
<pmichaud> we might be able to semantically get assignment to check
and see if its lhs has a lower precedence operator
<pmichaud> sorry, higher precedence
<pmichaud> tighter
<pmichaud> whatever
<pmichaud> although that's normally the case
<pmichaud> hmmmm
<pmichaud> anyway, file the bug :)
<pmichaud> as a lta error message

0 new messages