From c16264eac3b25f6f2bce14b0504071787bd2bc54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 2 Nov 2021 17:59:54 +0800 Subject: #687 await-in-sync --- test/diagnostics/init.lua | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'test/diagnostics/init.lua') diff --git a/test/diagnostics/init.lua b/test/diagnostics/init.lua index ab55cd92..6d97c7f6 100644 --- a/test/diagnostics/init.lua +++ b/test/diagnostics/init.lua @@ -6,6 +6,7 @@ local catch = require 'catch' config.get 'Lua.diagnostics.neededFileStatus'['deprecated'] = 'Any' config.get 'Lua.diagnostics.neededFileStatus'['type-check'] = 'Any' +config.get 'Lua.diagnostics.neededFileStatus'['await-in-sync'] = 'Any' rawset(_G, 'TEST', true) @@ -1348,12 +1349,22 @@ end f() ]] ----TODO(arthur) -do return end - TEST [[ ---@type file* local f f:read '*a' f:read('*a') ]] + +TEST [[ +function F() + () +end +]] + +TEST [[ +---@async +function F() + coroutine.yield() +end +]] -- cgit v1.2.3