From 1b8f1893ed1f0ae8495d171488c84984f67fc8ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 13 Dec 2018 21:06:53 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/test/type_inference/init.lua | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'server/test') diff --git a/server/test/type_inference/init.lua b/server/test/type_inference/init.lua index 36e28aec..8f5909c0 100644 --- a/server/test/type_inference/init.lua +++ b/server/test/type_inference/init.lua @@ -89,10 +89,22 @@ TEST 'integer' [[ = ~ y ]] -TEST 'boolean' [[ +TEST 'number' [[ +local a = true +local b = 1 = a and b ]] +TEST 'number' [[ +local a = false +local b = 1 + = a or b +]] + +TEST 'boolean' [[ + = a == b +]] + TEST 'integer' [[ = a << b ]] -- cgit v1.2.3