summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelog.md1
-rw-r--r--script/parser/guide.lua5
2 files changed, 6 insertions, 0 deletions
diff --git a/changelog.md b/changelog.md
index d02df0bc..4cd5eec5 100644
--- a/changelog.md
+++ b/changelog.md
@@ -9,6 +9,7 @@
* `CHG` hover: `LuaDoc` also catchs `--` (no need `---`)
* `CHG` rename: support doc
* `CHG` completion: keyword considers expression
+* `FIX` [#297](https://github.com/sumneko/lua-language-server/issues/297)
## 1.5.0
`2020-12-5`
diff --git a/script/parser/guide.lua b/script/parser/guide.lua
index d5e6d29d..90d09f7a 100644
--- a/script/parser/guide.lua
+++ b/script/parser/guide.lua
@@ -1401,9 +1401,14 @@ function m.checkSameSimpleInValueOfSetMetaTable(status, func, start, queue)
end
function m.checkSameSimpleInValueOfCallMetaTable(status, call, start, queue)
+ if status.crossMetaTableMark then
+ return
+ end
+ status.crossMetaTableMark = true
if call.type == 'call' then
m.checkSameSimpleInValueOfSetMetaTable(status, call.node, start, queue)
end
+ status.crossMetaTableMark = false
end
function m.checkSameSimpleInSpecialBranch(status, obj, start, queue)