From 49b0244734a579036c1d3f318ce435a94974c038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 12 May 2021 20:58:33 +0800 Subject: resolve pcall --- test/definition/luadoc.lua | 2 +- test/type_inference/init.lua | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/definition/luadoc.lua b/test/definition/luadoc.lua index 14f24552..d0d95847 100644 --- a/test/definition/luadoc.lua +++ b/test/definition/luadoc.lua @@ -113,7 +113,7 @@ print() TEST [[ local function f() - return 1 + return end ---@class Class diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 0a041433..9a6cce6f 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -171,6 +171,11 @@ string.sub = function () end ]] TEST 'function' [[ +---@class stringlib +local string + +string.sub = function () end + _VERSION = 'Lua 5.4' = _VERSION.sub @@ -217,8 +222,11 @@ end _, = pcall(x) ]] -TEST 'oslib' [[ -local = require 'os' +TEST 'integer' [[ +local function x() + return 1 +end +_, = xpcall(x) ]] TEST 'string|table' [[ -- cgit v1.2.3