From 50688a8001325308c30a8669783f1d0e379b463b 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, 25 May 2022 02:17:13 +0800 Subject: fix #1150 --- test/type_inference/init.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'test') diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 947b97b3..5f54cebf 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -2323,3 +2323,29 @@ end local = f() ]] + +TEST 'number' [[ +for _ in _ do + ---@type number + local +end +]] + +TEST 'unknown' [[ +for _ in _ do + ---@param x number + local +end +]] + +TEST 'unknown' [[ +---@type number +for in _ do +end +]] + +TEST 'number' [[ +---@param x number +for in _ do +end +]] -- cgit v1.2.3