Closed pkuvegeta closed 8 years ago
local aClass = {} setmetatable(aClass, {newindex = function() end, index = function() end })
local p = {a = 1, b = 2} for , v in pairs(p) do aClass[] = v end
This program break in Moonsharp It throws exception for attempting to call Tuple (next, table, "a") at the for loop line in the second iteration.
Bad bug. Checking into it. It's not that __newindex is unsupported or anything.. for some reasons the internal stack gets trashed.
Fixed on develop branch.
local aClass = {} setmetatable(aClass, {newindex = function() end, index = function() end })
local p = {a = 1, b = 2} for , v in pairs(p) do aClass[] = v end
This program break in Moonsharp It throws exception for attempting to call Tuple (next, table, "a") at the for loop line in the second iteration.