mirror of
https://github.com/luau-lang/luau.git
synced 2024-11-15 14:25:44 +08:00
a02eb78c96
Right now, you can index an intersection of tables fine when using `x.prop` syntax, but not when using `x["prop"]` syntax. This fixes it for the latter case ```lua type Foo = { Bar: string, } & { Baz: number } local x: Foo = { Bar = "1", Baz = 2 } local y = x["Bar"] -- TypeError: Expected type table, got '{| Bar: string |} & {| Baz: number |}' instead ``` Part of a fix to https://github.com/Roblox/luau/issues/533#issuecomment-1291779353 |
||
---|---|---|
.. | ||
include/Luau | ||
src |