summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-06 22:59:21 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-06 22:59:21 +0800
commit5ec199aa6c9119cac7a4e53694eaa7f9273bc58a (patch)
treeafbb6ee15cd80370d2640f9917b31dd7396a964a /test
parent353caabfce0ee23644d3d74cbcbfcce3fbb32b73 (diff)
downloadlua-language-server-5ec199aa6c9119cac7a4e53694eaa7f9273bc58a.zip
support filter of binary operator
Diffstat (limited to 'test')
-rw-r--r--test/type_inference/init.lua20
1 files changed, 20 insertions, 0 deletions
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 <?b?> = a .. 1
]]
+
+TEST 'A' [[
+---@class A
+---@operator add(boolean): boolean
+---@operator add(integer): A
+
+---@type A
+local a
+local <?b?> = a + 1
+]]
+
+TEST 'boolean' [[
+---@class A
+---@operator add(boolean): boolean
+---@operator add(integer): A
+
+---@type A
+local a
+local <?b?> = a + true
+]]