Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* `NEW` added lua regular expression support for Lua.doc.<scope>Name [#2753](https://github.com/LuaLS/lua-language-server/pull/2753)
* `FIX` Bad triggering of the `inject-field` diagnostic, when the fields are declared at the creation of the object [#2746](https://github.com/LuaLS/lua-language-server/issues/2746)
* `CHG` Change spacing of parameter inlay hints to match other LSPs, like `rust-analyzer`
* `FIX` Inconsistent type narrow behavior of function call args [#2758](https://github.com/LuaLS/lua-language-server/issues/2758)

## 3.9.3
`2024-6-11`
Expand Down
6 changes: 6 additions & 0 deletions script/vm/compiler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,12 @@ local function matchCall(source)
newNode:removeNode(needRemove)
newNode.originNode = myNode
vm.setNode(source, newNode, true)
if call.args then
-- clear node caches of args to allow recomputation with the type narrowed call
for _, arg in ipairs(call.args) do
vm.removeNode(arg)
end
end
end
end

Expand Down