summary refs log tree commit diff stats
path: root/tests/misc/tunsignedcmp.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc/tunsignedcmp.nim')
-rw-r--r--tests/misc/tunsignedcmp.nim15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/misc/tunsignedcmp.nim b/tests/misc/tunsignedcmp.nim
new file mode 100644
index 000000000..a66fbaae1
--- /dev/null
+++ b/tests/misc/tunsignedcmp.nim
@@ -0,0 +1,15 @@
+discard """
+  output: '''true
+true
+true'''
+"""
+
+# bug 1420
+import unsigned
+
+var x = 40'u32
+var y = 30'u32
+echo x > y # works
+
+echo((40'i32) > (30'i32))
+echo((40'u32) > (30'u32)) # Error: ordinal type expected