summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorBung <crc32@qq.com>2022-12-06 14:44:54 +0800
committerGitHub <noreply@github.com>2022-12-06 07:44:54 +0100
commit5d469686b05ba0435690fccf6fb6f7d95cf09c73 (patch)
treeaba481990503d101ee0bd353c08a496c30b09468 /tests
parentfeb0481ba39c4230ba4459be6ac4b2d9f4b02a3b (diff)
downloadNim-5d469686b05ba0435690fccf6fb6f7d95cf09c73.tar.gz
fix #20829 Regression in int64 type matching since (#21019)
fix #20829 Regression in int64 type matching
Diffstat (limited to 'tests')
-rw-r--r--tests/arithm/t1.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/arithm/t1.nim b/tests/arithm/t1.nim
index f9a87684e..36402da07 100644
--- a/tests/arithm/t1.nim
+++ b/tests/arithm/t1.nim
@@ -1,2 +1,14 @@
 doAssert typeOf(1.int64 + 1.int) is int64
 doAssert typeOf(1.uint64 + 1.uint) is uint64
+doAssert int64 is SomeNumber
+doAssert int64 is (SomeNumber and not(uint32|uint64|uint|int))
+doAssert int64 is (not(uint32|uint64|uint|int))
+doAssert int isnot int64
+doAssert int64 isnot int
+var myInt16 = 5i16
+var myInt: int
+doAssert typeOf(myInt16 + 34) is int16    # of type `int16`
+doAssert typeOf(myInt16 + myInt) is int   # of type `int`
+doAssert typeOf(myInt16 + 2i32) is int32  # of type `int32`
+doAssert int32 isnot int64
+doAssert int32 isnot int