summary refs log tree commit diff stats
path: root/tests/ccgbugs/tuplecast.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ccgbugs/tuplecast.nim')
-rw-r--r--tests/ccgbugs/tuplecast.nim8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ccgbugs/tuplecast.nim b/tests/ccgbugs/tuplecast.nim
new file mode 100644
index 000000000..d60e8c490
--- /dev/null
+++ b/tests/ccgbugs/tuplecast.nim
@@ -0,0 +1,8 @@
+
+# bug #4345
+
+# only needs to compile
+proc f(): tuple[a, b: uint8] = (1'u8, 2'u8)
+
+let a, b = f()
+let c = cast[int](b)