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

fix: add missing errs ~= nil checks to script/vm/type checkTableShape #2956

Merged
merged 3 commits into from
Nov 15, 2024

Conversation

d-enk
Copy link
Contributor

@d-enk d-enk commented Nov 14, 2024

fix that

[Error - 12:44:58 PM] Request textDocument/semanticTokens/range failed.
  Message: [12:44:56.481][error][#0:script/vm/type.lua:341]: script/vm/type.lua:341: attempt to get length of a nil value (local 'errs')
stack traceback:
	script/vm/type.lua:341: in function <script/vm/type.lua:287>
	(...tail calls...)
	script/vm/type.lua:461: in function 'vm.vm.isSubType'
	script/vm/type.lua:372: in function 'vm.vm.isSubType'
	script/vm/type.lua:785: in function 'vm.vm.canCastType'
	script/vm/function.lua:349: in upvalue 'isAllParamMatched'
	script/vm/function.lua:363: in upvalue 'calcFunctionMatchScore'
	script/vm/function.lua:400: in function 'vm.vm.getExactMatchedFunctions'
	script/vm/compiler.lua:611: in upvalue 'matchCall'
	script/vm/compiler.lua:2278: in function 'vm.vm.compileNode'
	script/vm/infer.lua:272: in function 'vm.vm.getInfer'
	script/core/semantic-tokens.lua:140: in function <script/core/semantic-tokens.lua:114>
	(...tail calls...)
	script/core/semantic-tokens.lua:892: in local 'callback'
	script/parser/guide.lua:719: in function 'parser.guide.eachSourceBetween'
	script/core/semantic-tokens.lua:887: in function 'core.semantic-tokens'
	script/provider/provider.lua:1124: in function <script/provider/provider.lua:1112>
	[C]: in function 'xpcall'
	script/proto/proto.lua:202: in function <script/proto/proto.lua:177>

@sumneko sumneko merged commit db8127a into LuaLS:master Nov 15, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants