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

operator 对于左右两边类型不一样的情况下只能支持定义该 operator 的类型在左边,在右边会推到不了类型

Open zzyAZU opened this issue 1 year ago • 0 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

---@class A ---@operator add(number): number local a

local b = 1 + a 此处 b 应该推到为 number, 但是实际为 unknown

Actual Behaviour

实际为 unknown

Reproduction steps

  1. Go to '...'
  2. Click '...'
  3. See error '...'

Additional Notes

No response

Log File

No response

zzyAZU avatar May 15 '24 07:05 zzyAZU