-
-
Notifications
You must be signed in to change notification settings - Fork 391
Open
Description
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Windows
What is the issue affecting?
Diagnostics/Syntax Checking
Expected Behaviour
local a = {}
a.__index = a
function a:m1()
end
-- b inherit from a
local b = setmetatable({}, a)
-- override m2()
function b:m2() --- no warning generated
endActual Behaviour
local a = {}
a.__index = a
function a:m1()
end
-- b inherit from a
local b = setmetatable({}, a)
-- override m2()
function b:m2() --- duplicate field `m`
endReproduction steps
- Just copy the code and lint them
Additional Notes
Inheritance and override methods is prevent by LuaLS linter.
Override is a common and basic concept. But LuaLS seems can't recognize it but provide warnings.
In the case, m2 is not a duplicate field, but just shadowing or overriding.
Log File
No response
Metadata
Metadata
Assignees
Labels
No labels
