PlutoLang / Pluto

A superset of Lua 5.4 with a focus on general-purpose programming.
https://pluto-lang.org
MIT License
367 stars 22 forks source link

Walrus operator in a nested expression #816

Closed Sainan closed 5 months ago

Sainan commented 5 months ago

The following code is no longer valid on main but was valid on 0.9.0:

local function getvalue()
    return 0
end

local val = 0

if val >= 0 and val == (cur := getvalue()) then
    print(cur)
end