lua-language-server icon indicating copy to clipboard operation
lua-language-server copied to clipboard

Typed field overrides the type of other fields

Open halflifefan opened this issue 1 year ago • 1 comments

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

local my_class: my_class {
    my_function: function,
    [string]: unknown,
}

Actual Behaviour

local my_class: my_class {
    my_function: function|unknown,
    [string]: unknown,
}

Reproduction steps

---@class my_class
---@field [string] unknown
local my_class = {}

function my_class:my_function() end

Additional Notes

No response

Log File

No response

halflifefan avatar Jun 15 '24 04:06 halflifefan