LuaLS / LuaLS/lua-language-server
'@operator call' only supports a single argument
- Dominant language
- Lua
- Stars
- 4.4k
- Forks
- 442
- PR merge metrics
- No merged PRs in 30d
Description
### 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?
Annotations
### Expected Behaviour
When using the
```
---@operator call([...])
```
annotation, any number of arguments should be permitted, like with the normal `fun([...])` annotation.
### Actual Behaviour
Writing something like
```
---@operator call(string, string)
```
causes a syntax error,
### Reproduction steps
1. Define a custom class with a custom `@operator call` annotation:
```
---@class MyTestClass
---@operator call(string, string)
```
### Additional Notes
The exact error is: `')' expected.Lua Syntax Check.(luadoc-miss-symbol)`
### Log File
_No response_
Contributor guide
Research direction
Start by reproducing the supplied `MyTestClass` example and searching the annotation handling for `@operator call`. Done means the two-argument annotation is accepted without `luadoc-miss-symbol`, while the existing single-argument form continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100