You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a deep copy function that I made for tables with generics that also support metatables, and in the new type solver it fails to infer the type of tmetatable variable. (Produces a warning with a blocked-1234 statement.)
localfunctiondeepCopy<T>(original: {T}): {T}
localcopy=table.clone(original)
forkey, valueinoriginaldoiftype(value) =="table"thenlocaltmetatable=getmetatable(value); -- union<*blocked-123456*, (buffer | class | function | number | string | table | thread | true) & *blocked-123456*> Function only returns 0 values, but 1 is required herecopy[key] =ifnottmetatablethendeepCopy(value) elsesetmetatable(deepCopy(value), tmetatable)
endendreturncopyend
The text was updated successfully, but these errors were encountered:
This is a deep copy function that I made for tables with generics that also support metatables, and in the new type solver it fails to infer the type of
tmetatable
variable. (Produces a warning with a blocked-1234 statement.)The text was updated successfully, but these errors were encountered: