summaryrefslogtreecommitdiff
path: root/test/definition/bug.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-03-19 16:35:56 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-03-19 16:35:56 +0800
commita39066fe5f61572920239f533eef0d18b695e728 (patch)
tree27995e702f1640ebbde538f5746e22dad8f7dcb5 /test/definition/bug.lua
parent8a3137e6d4c3e2672564ac95cb9f2758ff8a5d89 (diff)
downloadlua-language-server-a39066fe5f61572920239f533eef0d18b695e728.zip
fix endless loop
Diffstat (limited to 'test/definition/bug.lua')
-rw-r--r--test/definition/bug.lua60
1 files changed, 60 insertions, 0 deletions
diff --git a/test/definition/bug.lua b/test/definition/bug.lua
index 8c446123..d9ed7afc 100644
--- a/test/definition/bug.lua
+++ b/test/definition/bug.lua
@@ -169,3 +169,63 @@ end
local v
v.<?bar1?>
]]
+
+TEST [[
+local A, B
+
+function A:get1()
+ local <!a!> = B:get()
+ return <!a!>
+end
+
+function A:get2()
+ local <!a!> = B:get()
+ return <!a!>
+end
+
+function A:get3()
+ local <!a!> = B:get()
+ return <!a!>
+end
+
+function A:get4()
+ local <!a!> = B:get()
+ return <!a!>
+end
+
+function A:get5()
+ local <!a!> = B:get()
+ return <!a!>
+end
+
+function A:get6()
+ local <!a!> = B:get()
+ return <!a!>
+end
+
+function A:get7()
+ local <!a!> = B:get()
+ return <!a!>
+end
+
+function A:get8()
+ local <!a!> = B:get()
+ return <!a!>
+end
+
+function B:get()
+ local <!b!>
+ <!b!> = A:get1()
+ <!b!> = A:get2()
+ <!b!> = A:get3()
+ <!b!> = A:get4()
+ <!b!> = A:get5()
+ <!b!> = A:get6()
+ <!b!> = A:get7()
+ <!b!> = A:get8()
+ return <!b!>
+end
+
+local <!b!> = B:get()
+print(<?b?>)
+]]