From 72f18d0fb52ff5878549bf8e1d2be9c4ebf93340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 1 Feb 2021 16:00:15 +0800 Subject: clean up code --- script/core/hint.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'script') diff --git a/script/core/hint.lua b/script/core/hint.lua index f1aea66c..f592bd77 100644 --- a/script/core/hint.lua +++ b/script/core/hint.lua @@ -20,8 +20,7 @@ local function typeHint(uri, edits, start, finish) if source[1] == '_' then return end - -- ζŽ’ι™€ζŽ‰ xx = function 与 xx = {} - if source.value and (source.value.type == 'function' or source.value.type == 'table') then + if source.value and guide.isLiteral(source.value) then return end if source.parent.type == 'funcargs' then @@ -33,9 +32,6 @@ local function typeHint(uri, edits, start, finish) return end end - if source.value and guide.isLiteral(source.value) then - return - end local infer = vm.getInferType(source, 0) if infer == 'any' or infer == 'nil' then -- cgit v1.2.3