|Subject:||[LTA] Can “Cannot modify an immutable X” error message also include the value? (42 = $x)|
Code: my $x; $x = 50; 42 = $x Result: Cannot modify an immutable Int in block <unit> at -e line 1 So which one of the assignments actually failed (both are on the same line)? This bug report is motivated by this thinkperl6 exercise: • We’ve seen that $n = 42 is legal. What about 42 = $n? I think a good error message would be “Cannot modify an immutable Int (42)”, or whatever else which includes the value itself.