NightrainsRbx / RobloxLsp

Roblox Luau Language Server based on Lua by sumneko.
https://devforum.roblox.com/t/roblox-lsp-full-intellisense-for-roblox-and-luau/717745
MIT License
211 stars 49 forks source link

Return value assign as function and as a table resembling metatable with method __call as a value of Table mistaking for thinking it can call children when already called by Table colon #224

Open Hezaus opened 1 year ago

Hezaus commented 1 year ago

This is just weird. Although will error if you try to do it unless you do it with a dot instead of a colon. Reproduction code:

local function Assemble()
    return false :: ({
        Function: (self: any) -> nil,
        Value: number,
    }) & (Text: string) -> nil
end

local Table = { ["Issue"] = Assemble() }

Table:Issue:

image

Tested with strict mode on.