luau
luau copied to clipboard
String and boolean literals being inferred as `string` and `boolean` types rather than the literal type during table construction with metatable
Screenshots below demonstrate the bug:


Source:
type Foo = typeof(setmetatable(
{} :: {
Bar: false
},
{} :: {}
))
local foo: Foo = setmetatable({ Bar = false }, {})