__index behavior broke for mixed metatables

Started getting some new errors this morning in studio. Here’s a simple repro:

local mt = {
	{}, -- This field causes the issue.
	__index = {X = true},
local self = setmetatable({}, mt)
assert(self.X) -- fails

I was using the array part to create a 2-dimensional weak table cache. I can fix it easily by using the array’s hash part instead. I usually use the array part of tables to optimize memory usage and reduce unique string constants. It worked yesterday night, so it seems like an unintentional VM behavior change.


Should be fixed now, thanks for the report.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.