diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-12 10:33:58 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-12 10:33:58 +0800 |
commit | f3b64a19f9558cada90ccc2f885bf44fef2e1d7e (patch) | |
tree | 9c7f88fd1b6b53035126c959857ef6ac3bd4e1b9 /server | |
parent | c7611a41f655116b1526ead077686e7de6a2d9c6 (diff) | |
download | lua-language-server-f3b64a19f9558cada90ccc2f885bf44fef2e1d7e.zip |
优化
Diffstat (limited to 'server')
-rw-r--r-- | server/src/vm/value.lua | 3 | ||||
-rw-r--r-- | server/test/full/example.lua | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/server/src/vm/value.lua b/server/src/vm/value.lua index d01712a6..453c0799 100644 --- a/server/src/vm/value.lua +++ b/server/src/vm/value.lua @@ -202,6 +202,9 @@ function mt:eachChild(callback, mark, foundIndex) end function mt:mergeValue(value) + if self == value then + return + end if value._type then for tp, rate in pairs(value._type) do self:setType(tp, rate) diff --git a/server/test/full/example.lua b/server/test/full/example.lua index 321f3bc7..90eff536 100644 --- a/server/test/full/example.lua +++ b/server/test/full/example.lua @@ -13,4 +13,4 @@ local function testIfExit(path) print('基准测试耗时:', os.clock() - clock) end end ---testIfExit(ROOT / 'test' / 'example' / 'vm.lua') +testIfExit(ROOT / 'test' / 'example' / 'vm.lua') |