EmmyLua / EmmyLua-LanguageServer

153 stars 27 forks source link

Feature Request - Diagnostics for Type Errors #35

Closed weilbith closed 2 years ago

weilbith commented 2 years ago

Hey,

I wonder how hard it would be to add diagnostic support and report type errors. What I would love to see is when I define a function with typed parameter annotation, parameters of calls to this function are checked. Like that:

---@param bar number
local function foo(bar)
  print(bar + 1)
end 

foo("bar") -- get diagnistic type error here
CppCXY commented 2 years ago

Experimental support