mirror of
https://github.com/luau-lang/luau.git
synced 2024-12-12 13:00:38 +00:00
a8047b2e46
Fixes https://github.com/luau-lang/luau/issues/1387 Was suggested by @alexmccord I changed ``singletons[0]`` to ``singletons.front()``, unsure if that makes a huge difference, and then I added the rest of the things needed for the return type. Maybe it's also the ideal location since doing it before looping through ``keys`` won't add the string into the type arena. I put comments next to it based on how I thought it would make sense. ``LUAU_ASSERT`` seems to trigger when there's only one entry being put inside a UnionType. It's as if it was put there for quality. Allow edits by maintainers is enabled. I tested this with a quick Unit Test something like ```lua local test: keyof<typeof({a="test"})> ``` |
||
---|---|---|
.. | ||
include/Luau | ||
src |