On 2019-11-30 06:28, Timo Paulssen wrote:

On 30/11/2019 09:05, ToddAndMargo via perl6-users wrote:
One of the weirdest was

for @Result.kv -> $I, $Line {
    if $I % 2 = 0

being told I could not change an immutable object.


Here you're trying to assign 0 to the result of $I % 2, if that's
actually exactly the code. You want to compare here, not assign, i.e.
use == instead of =

HTH
   - Timo


Hi Timo,

Indeed!

And the 64000 dollar question is why did the compiler not
toss it out?

-T

Reply via email to