-
-
Notifications
You must be signed in to change notification settings - Fork 351
EmmyLua definitions not recognized in Lua Language Server v2.4.10 #822
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
Comments
Should be ---@class MyType
local MyTypeTbl = {}
function MyTypeTbl:init()
end
function MyTypeTbl:GetSomething()
return 1
end
return {
MyTypeTbl = MyTypeTbl
} Related to: #806 |
@sumneko Still seems to occur on |
You need to rewrite your code to ---@class MyType
local MyTypeTbl = {}
function MyTypeTbl:init()
end
function MyTypeTbl:GetSomething()
return 1
end
return {
MyTypeTbl = MyTypeTbl
} |
Ah, I see. Perhaps an error message or some type of diagnosis indicator to indicate this issue for any others that might be relying on this behavior from previous versions? |
When I am free, I will add more diagnostics related to -- this is a bug that has fixed in 2.4.10
---@class A
function mt:init(x, y)
print(x) -- `x` is A
print(y) -- `y` is A
print(self) -- `self` is A, `mt` can be inferred by `self` so `mt` is A
end |
Describe the bug
EmmyLua declarations are not recognized anymore
This has only started occurring on version 2.4.10. Works otherwise on 2.4.9 and below.
To Reproduce
Steps to reproduce the behavior:
v2.4.9:

v2.4.10:

main.lua:
definitions.lua:
Expected behavior
Language server recognizes the EmmyLua type and the functions defined on it.
Environment (please complete the following information):
Version: 1.62.3 (system setup)
Commit: ccbaa2d27e38e5afa3e5c21c1c7bef4657064247
Date: 2021-11-17T08:11:14.551Z
Electron: 13.5.2
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19042
(Not remote)
Provide logs
Not sure if applicable, but log - https://pastebin.com/raw/29uYg7jN
The text was updated successfully, but these errors were encountered: