summary refs log tree commit diff stats
path: root/tests/enum/tenum.nim
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2023-05-07 03:38:17 +0800
committerGitHub <noreply@github.com>2023-05-06 21:38:17 +0200
commit8cf5643621600aaa869935721227fc3b7ee5f881 (patch)
tree0b829d97f3ea714b2552d542c50b321ad7fb1a9a /tests/enum/tenum.nim
parentb562e1e6d85d5c64eec1d714257e2f728e60f12f (diff)
downloadNim-8cf5643621600aaa869935721227fc3b7ee5f881.tar.gz
fixes #21280; Enum with int64.high() value crashes compiler (#21285)
* fixes #21280; Enum with int64.high() value crashes compiler

* Update tests/enum/tenum.nim

* Update tests/enum/tenum.nim

* fixes tests

* Update tests/enum/tenum.nim

---------

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Diffstat (limited to 'tests/enum/tenum.nim')
-rw-r--r--tests/enum/tenum.nim8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/enum/tenum.nim b/tests/enum/tenum.nim
index 88d85ddcc..8046c6589 100644
--- a/tests/enum/tenum.nim
+++ b/tests/enum/tenum.nim
@@ -176,3 +176,11 @@ block: # bug #12589
 
     when not defined(gcRefc):
       doAssert $typ() == "wkbPoint25D"
+
+    block: # bug #21280
+      type
+        Test = enum
+          B = 19
+          A = int64.high()
+
+      doAssert ord(A) == int64.high()