Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用提示时报告Request textDocument/completion failed. #1141

Closed
AuTsing opened this issue May 14, 2022 · 0 comments
Closed

使用提示时报告Request textDocument/completion failed. #1141

AuTsing opened this issue May 14, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@AuTsing
Copy link

AuTsing commented May 14, 2022

Describe the bug
使用提示时报告Request textDocument/completion failed.
Snipaste_2022-05-14_14-08-10

To Reproduce
复现代码

local Interface = {}

---@generic CLASS
---@param class CLASS
---@param constuctor fun(this: CLASS, ...): CLASS
function Interface:constructor(class, constuctor)
    class._constuctor = constuctor
end

local Class = {}

Interface:constructor(Class,)

键入最后一行的逗号时报告错误

Expected behavior
正常提示且不报告错误

Screenshots
Snipaste_2022-05-14_13-00-54

Environment (please complete the following information):

  • OS: Windows
  • Client: VSCode v3.2.2

Provide logs
···
[Error - 12:55:42] Request textDocument/semanticTokens/full failed.
Message: [12:55:42.883][error][#0:script\vm\generic.lua:21]: script\vm\generic.lua:21: attempt to index a nil value (local 'source')
stack traceback:
script\vm\generic.lua:21: in upvalue 'cloneObject'
script\vm\generic.lua:56: in upvalue 'cloneObject'
script\vm\generic.lua:101: in upvalue 'cloneObject'
script\vm\generic.lua:124: in method 'resolve'
script\vm\compiler.lua:756: in upvalue 'compileCallArgNode'
script\vm\compiler.lua:802: in function 'vm.compileCallArg'
script\vm\compiler.lua:943: in function <script\vm\compiler.lua:929>
(...tail calls...)
script\vm\compiler.lua:1759: in upvalue 'compileByNode'
script\vm\compiler.lua:1865: in function 'vm.compileNode'
script\vm\compiler.lua:863: in upvalue 'compileLocal'
... (skipping 9 levels)
script\vm\compiler.lua:1119: in function <script\vm\compiler.lua:1118>
(...tail calls...)
script\vm\compiler.lua:1759: in upvalue 'compileByNode'
script\vm\compiler.lua:1865: in function 'vm.compileNode'
script\vm\infer.lua:176: in function 'vm.getInfer'
script\core\semantic-tokens.lua:84: in function <script\core\semantic-tokens.lua:64>
(...tail calls...)
script\core\semantic-tokens.lua:815: in local 'callback'
script\parser\guide.lua:656: in function 'parser.guide.eachSourceBetween'
script\core\semantic-tokens.lua:814: in function 'core.semantic-tokens'
script\provider\provider.lua:918: in function <script\provider\provider.lua:912>
[C]: in function 'xpcall'
script\proto\proto.lua:184: in function <script\proto\proto.lua:159>

Code: -32603
···

@sumneko sumneko added the bug Something isn't working label May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants