Skip to content

@enum 不能检测不存在的字段 #1750

Open
@HiKit

Description

@HiKit

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?

Type Checking

Expected Behaviour

枚举无法检测不存在的字段,见代码及截图;版本V3.6.4

---@enum ETestEnum
local ETestEnum = {
	A = 1,
	B = 2,
	C = 3
}

---@param param ETestEnum
function Test(param)
	print(param)
end

Test(ETestEnum.D);

image

Actual Behaviour

[狗头]

Reproduction steps

[狗头]

Additional Notes

No response

Log File

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions