Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing type label when using "&" in definition, even though type exists #1182

Open
karl-police opened this issue Mar 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@karl-police
Copy link

karl-police commented Mar 7, 2024

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

But if you try this

local test = {} :: {} & string

It doesn't
image

but the autocomplete works fine
image

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

image

It should show "test" or not?

 

type test = () -> (string & number)
local test = {} :: test

Functions do show the return value in the type
image

I expected it to show test or string & number

@karl-police karl-police added the bug Something isn't working label Mar 7, 2024
@karl-police karl-police changed the title Missing type label, even though type exists Missing type label when using "&" in definition, even though type exists Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant