moonscript icon indicating copy to clipboard operation
moonscript copied to clipboard

Inconsistent update assignment behavior with 'with'

Open ThaisRobba opened this issue 7 years ago • 0 comments

If I do

my_str = "say "
with my_str = my_str .. "something"
    \sub(1, 10)

It works. But if I do

my_str = "say "
with my_str ..= "something"
    \sub(1, 10)

It does not, as it breaks the compilation. Behavior across assignments should be consistent as to avoid surprises (or having to look at the outputted Lua code).

ThaisRobba avatar Sep 12 '18 17:09 ThaisRobba