Alloyed / lua-lsp

A Lua language server
MIT License
288 stars 21 forks source link

corner cases in function sig generation #5

Closed Alloyed closed 6 years ago

Alloyed commented 7 years ago

At least, when looking at the builtins, there are many cases where returnTypes aren't provided, even when the function returns a value. This means that the void return type should be an empty returnTypes array, not the absence of one

Variants are now supported: implemented as multiple signatures for one item

Also, there does not seem to be a builtin example of an "error" return type, aka return nil, my_err. I think we will represent those like so function a() ->! bool, extra_ret, but it's unfortunate that it won't be available in the standard lib.

Alloyed commented 6 years ago

I think we're in a decent halfway place on this, will come back to it when we have better type support