diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2020-03-16 18:40:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-16 18:40:17 +0100 |
commit | 5ba5b5202acdf5e597ef1e83ebae84608669d32b (patch) | |
tree | 35bb02a813dd0d1da7d2fadab280a434eac54a0a /tests/misc/tunsignedconv.nim | |
parent | b9b53b6ca17662fbc71d9f632c4db859bf12c408 (diff) | |
download | Nim-5ba5b5202acdf5e597ef1e83ebae84608669d32b.tar.gz |
fixes #13661 (#13664) [backport]
Diffstat (limited to 'tests/misc/tunsignedconv.nim')
-rw-r--r-- | tests/misc/tunsignedconv.nim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/misc/tunsignedconv.nim b/tests/misc/tunsignedconv.nim index 17d137947..af334dd19 100644 --- a/tests/misc/tunsignedconv.nim +++ b/tests/misc/tunsignedconv.nim @@ -1,3 +1,6 @@ +discard """ + output: '''uint''' +""" # Tests unsigned literals and implicit conversion between uints and ints # Passes if it compiles @@ -43,3 +46,12 @@ block t4176: var yyy: uint8 = 0 yyy = yyy - 127 doAssert type(yyy) is uint8 + +# bug #13661 + +proc fun(): uint = cast[uint](-1) +const x0 = fun() + +echo typeof(x0) + +discard $x0 |