summary refs log tree commit diff stats
path: root/tests/misc/tunsignedconv.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2020-08-31 14:46:23 +0200
committerGitHub <noreply@github.com>2020-08-31 14:46:23 +0200
commitff13f8cc3c74d4048b6c2604fe4b8e5365f5c13f (patch)
treec17f9ab0788f945688de5f5ff57973005d7ff7a8 /tests/misc/tunsignedconv.nim
parenta76ae8f79584c5a491861daf2efda9908b21e488 (diff)
downloadNim-ff13f8cc3c74d4048b6c2604fe4b8e5365f5c13f.tar.gz
fixes #15210 [backport:1.2] (#15237)
* fixes #15210 [backport:1.2]

* use patched version of bigints library
Diffstat (limited to 'tests/misc/tunsignedconv.nim')
-rw-r--r--tests/misc/tunsignedconv.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/misc/tunsignedconv.nim b/tests/misc/tunsignedconv.nim
index 07fc03e59..e9a2a2189 100644
--- a/tests/misc/tunsignedconv.nim
+++ b/tests/misc/tunsignedconv.nim
@@ -69,3 +69,14 @@ let rangeVar = 0'u64 ..< limit
 doAssert repr(rangeVar) == """[a = 0,
 b = 0]
 """
+
+# bug #15210
+
+let a3 = not 0'u64
+var success = false
+try:
+  discard a3.int64
+except RangeDefect:
+  success = true
+
+doAssert success, "conversion should fail at runtime"