Skip to content

Fix for #236 (__newindex implementation)#325

Open
Joy-less wants to merge 1 commit intomoonsharp-devs:legacy/2.0from
Joy-less:newindex-fix
Open

Fix for #236 (__newindex implementation)#325
Joy-less wants to merge 1 commit intomoonsharp-devs:legacy/2.0from
Joy-less:newindex-fix

Conversation

@Joy-less
Copy link

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)

@Benjamin-Dobell Benjamin-Dobell changed the base branch from master to legacy/2.0 March 3, 2026 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant