Skip to content

No warning for missing inherited fields #2337

Closed
@felixhirt

Description

@felixhirt

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

If we write this code:

--- @class Base
--- @field BaseString string
--- @field BaseNum number?

--- @class Extended : Base
--- @field ExtendedString string
--- @field ExtendedNum number?

--- @type Extended
local instance = { ExtendedString = "Value" }

There should be a warning about the missing required field "BaseString"

Actual Behaviour

There is only a warning if "ExtendedString" is missing

Reproduction steps

Copy the code above into any lua project

Additional Notes

No response

Log File

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feat/diagnosticsRelated to the diagnostics feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions