From 68617adb91ecae00725523ae6bf2833fe6c07bd1 Mon Sep 17 00:00:00 2001 From: Araq Date: Fri, 27 Jan 2017 09:49:45 +0100 Subject: fixes #5216 --- tests/arithm/tand.nim | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/arithm/tand.nim (limited to 'tests/arithm') 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) -- cgit 1.4.1-2-gfad0