Skip to content

Missing fields not working for inherited classes #2740

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

Closed
Riddle1001 opened this issue Jul 3, 2024 · 1 comment · Fixed by #2970
Closed

Missing fields not working for inherited classes #2740

Riddle1001 opened this issue Jul 3, 2024 · 1 comment · Fixed by #2970

Comments

@Riddle1001
Copy link

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Linux

What is the issue affecting?

Diagnostics/Syntax Checking

Expected Behaviour

Have the fields from the parent class to be required

Actual Behaviour

The fields from the parent class are not required

Reproduction steps

---@class Animal
---@field name string
---@field age number

---@class Dog : Animal
---@field breed string

---@type Dog
local myDog = { -- Should throw missing fields error for "name" and "age"
	breed = "Labrador"
}

Additional Notes

image
image

Log File

n/a

@tomlau10
Copy link
Contributor

tomlau10 commented Jul 3, 2024

duplicate of #2337 and #2598

And I see that @Riddle1001 you had reacted with 👍 to both of the above issues, why do you still open another duplicate issue 😅 ?
With so many issues left opened and some of them are even duplicated, it will make maintainers harder to track and fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants