Skip to content

Commit cc9b302

Browse files
authored
Merge pull request #3212 from tomlau10/fix/exact-class-inject-field-msg
fix: incorrect inject field message for exact class extra field
2 parents 669602c + c129da3 commit cc9b302

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased
44
<!-- Add all new changes here. They will be moved under a version at release -->
5+
* `FIX` Incorrect inject-field message for extra table field in exact class
56

67
* `FIX` adds the `|lambda|` operator to the `Lua.runtime.nonstandardSymbol` configuration template, which allows the use of that option. Previously, support for it existed in the parser, but we could not actually use the option because it is not recognised in the configuration.
78
* `FIX` Typed `@field` (eg `---@field [string] boolean`) should not override other defined field [#2171](https://github.com/LuaLS/lua-language-server/issues/2171), [#2711](https://github.com/LuaLS/lua-language-server/issues/2711)

script/core/diagnostics/inject-field.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ return function (uri, callback)
134134
end
135135
local message = lang.script('DIAG_INJECT_FIELD', {
136136
class = vm.getInfer(src):view(uri),
137-
field = guide.getKeyName(src),
137+
field = guide.getKeyName(field),
138138
fix = '',
139139
})
140140
callback {

0 commit comments

Comments
 (0)