moonsharp
moonsharp copied to clipboard
Fix for #236 (__newindex implementation)
local MT = {}
function MT:__newindex(key, value)
print('['..key..'] = '..value)
end
local T = {}
setmetatable(T, MT)
T.A, T.B, T.C = 1, 2, 3
Previously, this would output
[A] = 1
[B] = 2
[C] = nil
With the fix, it outputs
[A] = 1
[B] = 2
[C] = 3
(This is a somewhat surface-level fix, the cause of the issue is probably very deep-rooted)