From 916b8563cc327af32a5c3dccfdb5434711d83377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 9 Jun 2022 16:32:05 +0800 Subject: view infer must specify uri --- script/core/diagnostics/close-non-object.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'script/core/diagnostics/close-non-object.lua') diff --git a/script/core/diagnostics/close-non-object.lua b/script/core/diagnostics/close-non-object.lua index c97014fa..d07aaebe 100644 --- a/script/core/diagnostics/close-non-object.lua +++ b/script/core/diagnostics/close-non-object.lua @@ -25,10 +25,10 @@ return function (uri, callback) return end local infer = vm.getInfer(source.value) - if not infer:hasClass() - and not infer:hasType 'nil' - and not infer:hasType 'table' - and infer:view('any', uri) ~= 'any' then + if not infer:hasClass(uri) + and not infer:hasType(uri, 'nil') + and not infer:hasType(uri, 'table') + and infer:view(uri, 'any') ~= 'any' then callback { start = source.value.start, finish = source.value.finish, -- cgit v1.2.3