Skip to content

Commit 22fde12

Browse files
committed
fix
1 parent bae4d2e commit 22fde12

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

Diff for: script/vm/compiler.lua

+5-1
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,11 @@ function vm.getClassFields(suri, object, key, ref, pushResult)
375375
if not searchedFields[fieldKey]
376376
and guide.isSet(field)
377377
and field.value then
378-
if guide.isLiteral(field.value) then
378+
if vm.getLocalID(field)
379+
and vm.getLocalID(field) == vm.getLocalID(field.value) then
380+
elseif src._globalNode
381+
and src._globalNode == field.value._globalNode then
382+
else
379383
hasFounded[fieldKey] = true
380384
end
381385
pushResult(field, true)

Diff for: test/definition/luadoc.lua

+10
Original file line numberDiff line numberDiff line change
@@ -922,4 +922,14 @@ f {
922922
}
923923
]]
924924

925+
TEST [[
926+
---@class A
927+
local a
928+
a.__index = a
929+
930+
---@class B: A
931+
local <!b!>
932+
b.<!<?__index?>!> = b
933+
]]
934+
925935
config.set(nil, 'Lua.type.castNumberToInteger', true)

0 commit comments

Comments
 (0)