diff options
Diffstat (limited to 'script/vm/compiler.lua')
-rw-r--r-- | script/vm/compiler.lua | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua index e62f7843..00c8170c 100644 --- a/script/vm/compiler.lua +++ b/script/vm/compiler.lua @@ -1519,9 +1519,16 @@ local compilerSwitch = util.switch() end end end - if lastReturn and not hasMarkDoc and lastReturn.types[1][1] == '...' then - hasMarkDoc = true - vm.setNode(source, vm.declareGlobal('type', 'unknown')) + if lastReturn + and not hasMarkDoc then + if lastReturn.types[1][1] == '...' then + hasMarkDoc = true + vm.setNode(source, vm.declareGlobal('type', 'unknown')) + end + if lastReturn.name and lastReturn.name[1] == '...' then + hasMarkDoc = true + vm.setNode(source, vm.compileNode(lastReturn)) + end end end local hasReturn |