Skip to content

Commit 73b9c49

Browse files
committed
Fix incorrect version of builtin variables
1 parent 8898f07 commit 73b9c49

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
<!-- Add all new changes here. They will be moved under a version at release -->
55
* `NEW` Added `completion.maxSuggestCount` which lets you increase the amount of fields to analyze before requiring more specific input
66
* `New` Omit parameter hints when the argument name matches
7+
* `New` `view document` supports `Lua 5.5`
78
* `FIX` Fix a typo in `no-unknown` diagnostic message
89
* `FIX` Autodoc generation so it does not include documentation for builtin Lua language features
910
* `FIX` Fix incorrect version in `view document`
11+
* `FIX` Fix incorrect version of builtin variables
1012

1113
## 3.16.1
1214
`2025-12-8`

script/vm/compiler.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ local util = require 'utility'
33
local config = require 'config'
44
local rpath = require 'workspace.require-path'
55
local files = require 'files'
6+
local scope = require 'workspace.scope'
67
---@class vm
78
local vm = require 'vm.vm'
89
local plugin = require 'plugin'
@@ -2204,9 +2205,13 @@ local compilerSwitch = util.switch()
22042205
---@type vm.global
22052206
local global = source.global
22062207
local uri = guide.getUri(source)
2208+
local scp = scope.getScope(uri)
22072209
vm.setNode(source, global)
22082210
if global.cate == 'variable' then
22092211
for luri, link in pairs(global.links) do
2212+
if not scp:isVisible(luri) then
2213+
goto continue
2214+
end
22102215
local firstSet = link.sets[1]
22112216
if firstSet then
22122217
local setNode = vm.compileNode(firstSet)
@@ -2218,6 +2223,7 @@ local compilerSwitch = util.switch()
22182223
end
22192224
end
22202225
end
2226+
::continue::
22212227
end
22222228
end
22232229
if global.cate == 'type' then

0 commit comments

Comments
 (0)