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
218 stars 53 forks source link

Return value assign as function mistaking for origin function. #223

Closed Hezaus closed 1 year ago

Hezaus commented 1 year ago

Although code work as intended but it may create confusion for mistaking that you are calling the Origin Function instead of the new return one. Occurrence: Happened with Table's function, local function, global function.

local function Return()
    return function(Parameter) end :: (Parameter:any) -> nil
end

local Issue = Return()

Issue()

Image on VSCode: image

Image on Roblox Studio: image

Hezaus commented 1 year ago

Installing luau lsp fix this issue