From 63211177f8f3ad2a50dca3ab2ccaae737486813c 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, 10 Aug 2023 17:04:20 +0800 Subject: support `@type` for `return` #2144 --- script/vm/compiler.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'script/vm/compiler.lua') diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua index a4147d70..543ee0d4 100644 --- a/script/vm/compiler.lua +++ b/script/vm/compiler.lua @@ -766,6 +766,11 @@ function vm.selectNode(list, index) if not exp then return vm.createNode(vm.declareGlobal('type', 'nil')), nil end + + if vm.bindDocs(list) then + return vm.compileNode(list), exp + end + ---@type vm.node? local result if exp.type == 'call' then -- cgit v1.2.3