summaryrefslogtreecommitdiff
path: root/script/vm
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-08-13 00:30:40 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-08-13 00:30:40 +0800
commite8e5becffd87486347db7b3b191c1a1eff19c664 (patch)
tree6ae17dc33bda62ed97317a97ce5dc8f7aadbc01b /script/vm
parent7cc86b43e1284bf173f46c3e3ba760551831ddf1 (diff)
downloadlua-language-server-e8e5becffd87486347db7b3b191c1a1eff19c664.zip
fix #1430
Diffstat (limited to 'script/vm')
-rw-r--r--script/vm/compiler.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index 60c7243e..c973ab8e 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -373,7 +373,8 @@ function vm.getClassFields(suri, object, key, ref, pushResult)
local fieldKey = guide.getKeyName(field)
if fieldKey and not searchedFields[fieldKey] then
if not searchedFields[fieldKey]
- and guide.isSet(field) then
+ and guide.isSet(field)
+ and guide.isLiteral(field.value) then
hasFounded[fieldKey] = true
pushResult(field, true)
end