diff options
author | Araq <rumpf_a@web.de> | 2017-01-27 09:49:45 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2017-01-27 09:49:45 +0100 |
commit | 68617adb91ecae00725523ae6bf2833fe6c07bd1 (patch) | |
tree | 6b93e61c8ec61527e81a47fa9d945b69d94bca4e /tests/arithm | |
parent | 376f6efa80cbbfca80d632bfb56350f716cd759f (diff) | |
download | Nim-68617adb91ecae00725523ae6bf2833fe6c07bd1.tar.gz |
fixes #5216
Diffstat (limited to 'tests/arithm')
-rw-r--r-- | tests/arithm/tand.nim | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/arithm/tand.nim b/tests/arithm/tand.nim new file mode 100644 index 000000000..fd0fa0dea --- /dev/null +++ b/tests/arithm/tand.nim @@ -0,0 +1,20 @@ +discard """ + output: '''int32 +int32 +1280 +1280''' +""" + +# bug #5216 + +import typetraits + +echo(name type((0x0A'i8 and 0x7F'i32) shl 7'i32)) + +let i8 = 0x0A'i8 +echo(name type((i8 and 0x7F'i32) shl 7'i32)) + +echo((0x0A'i8 and 0x7F'i32) shl 7'i32) + +let ii8 = 0x0A'i8 +echo((ii8 and 0x7F'i32) shl 7'i32) |