summaryrefslogtreecommitdiff
path: root/script/core/infer.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-05 23:53:29 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-05 23:53:29 +0800
commitf2db41df39000bc3ca0c93e0d2ac8b8fafaf4d57 (patch)
tree46bfa6408497141dea719f5a9648da2abaef21b1 /script/core/infer.lua
parentc0cf9ae2835f9a19fe6a9af743ddd24be7c3a123 (diff)
downloadlua-language-server-f2db41df39000bc3ca0c93e0d2ac8b8fafaf4d57.zip
#1018 add `inspect.lua`
Diffstat (limited to 'script/core/infer.lua')
-rw-r--r--script/core/infer.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/core/infer.lua b/script/core/infer.lua
index 88028a6c..76d6c3b4 100644
--- a/script/core/infer.lua
+++ b/script/core/infer.lua
@@ -4,6 +4,7 @@ local noder = require 'core.noder'
local util = require 'utility'
local vm = require "vm.vm"
local guide = require "parser.guide"
+local inspect = require 'inspect'
local CLASS = { 'CLASS' }
local TABLE = { 'TABLE' }
@@ -606,7 +607,7 @@ function m.searchAndViewInfers(source, field, mark)
local infers = m.searchInfers(source, field, mark)
local view = m.viewInfers(guide.getUri(source), infers)
if type(view) == 'boolean' then
- log.error('Why view is boolean?', util.dump(infers))
+ log.error('Why view is boolean?', inspect(infers))
return 'any'
end
return view