Open karl-police opened 4 months ago
Not sure what the equavilient of this box is in Luau's source code. Otherwise I'd have tried to test there.
Usually this box is shown
But if you try this
local test = {} :: {} & string
It doesn't
but the autocomplete works fine
so it is aware of the type, but it doesn't show the label, which is a bit weird
The more strange part is this one
type test = string & number local test = {} :: test
It should show "test" or not?
type test = () -> (string & number) local test = {} :: test
Functions do show the return value in the type
I expected it to show test or string & number
test
string & number
Not sure what the equavilient of this box is in Luau's source code. Otherwise I'd have tried to test there.
Usually this box is shown![image](https://github.com/luau-lang/luau/assets/12023782/62580e3c-78a9-4470-876e-a23146308cb0)
But if you try this
It doesn't![image](https://github.com/luau-lang/luau/assets/12023782/68129c5a-2dda-4f13-ba71-600d202cbdb8)
but the autocomplete works fine![image](https://github.com/luau-lang/luau/assets/12023782/cb2c9426-f995-4d9c-8f3d-6e48eaf1a642)
so it is aware of the type, but it doesn't show the label, which is a bit weird
The more strange part is this one
It should show "test" or not?
Functions do show the return value in the type![image](https://github.com/luau-lang/luau/assets/12023782/32372dc5-231f-42f1-a6cf-42c182d499a7)
I expected it to show
test
orstring & number