From 15fa11654114e7451d64a726f6ad9d6abbd92b35 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, 16 Jan 2023 17:00:56 +0800 Subject: improve type infer of recursion alias --- script/vm/sign.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'script/vm/sign.lua') diff --git a/script/vm/sign.lua b/script/vm/sign.lua index 10b08884..1f434475 100644 --- a/script/vm/sign.lua +++ b/script/vm/sign.lua @@ -193,7 +193,11 @@ function mt:resolve(uri, args) goto CONTINUE end end - local view = vm.viewObject(obj, uri) + if obj.type == 'variable' + or obj.type == 'local' then + goto CONTINUE + end + local view = vm.getInfer(obj):view(uri) if view then knownTypes[view] = true end @@ -219,7 +223,7 @@ function mt:resolve(uri, args) goto CONTINUE end end - local view = vm.viewObject(n, uri) + local view = vm.getInfer(n):view(uri) if knownTypes[view] then goto CONTINUE end -- cgit v1.2.3