diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2020-08-31 14:46:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-31 14:46:23 +0200 |
commit | ff13f8cc3c74d4048b6c2604fe4b8e5365f5c13f (patch) | |
tree | c17f9ab0788f945688de5f5ff57973005d7ff7a8 /tests/misc/tunsignedconv.nim | |
parent | a76ae8f79584c5a491861daf2efda9908b21e488 (diff) | |
download | Nim-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.nim | 11 |
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" |