From 5ec199aa6c9119cac7a4e53694eaa7f9273bc58a 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, 6 Jul 2022 22:59:21 +0800 Subject: support filter of binary operator --- test/type_inference/init.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test') diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 7bb39f19..619d7615 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -3535,3 +3535,23 @@ TEST 'A' [[ local a local = a .. 1 ]] + +TEST 'A' [[ +---@class A +---@operator add(boolean): boolean +---@operator add(integer): A + +---@type A +local a +local = a + 1 +]] + +TEST 'boolean' [[ +---@class A +---@operator add(boolean): boolean +---@operator add(integer): A + +---@type A +local a +local = a + true +]] -- cgit v1.2.3