summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-07-16 14:13:20 +0200
committerGitHub <noreply@github.com>2016-07-16 14:13:20 +0200
commit622ab7089c31eae3ff107dc7d1da4aa5b179356e (patch)
tree54f3e610b866dbd4b888104d6bbbe770f1bb90b2 /tests
parent8698de1742d577efa9dddc854d5cfb3f7b9fd1ff (diff)
parent915185dd11b6b4cdabf20cd3e9985b8044e2d3e2 (diff)
downloadNim-622ab7089c31eae3ff107dc7d1da4aa5b179356e.tar.gz
Merge pull request #4488 from mbaulch/fix4346improved
Use target field types in tuple conversions.
Diffstat (limited to 'tests')
-rw-r--r--tests/tuples/tconver_tuple.nim23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/tuples/tconver_tuple.nim b/tests/tuples/tconver_tuple.nim
new file mode 100644
index 000000000..306da77fe
--- /dev/null
+++ b/tests/tuples/tconver_tuple.nim
@@ -0,0 +1,23 @@
+# Bug 4479
+
+type
+  MyTuple = tuple
+    num: int
+    strings: seq[string]
+    ints: seq[int]
+
+var foo = MyTuple((
+  num: 7,
+  strings: @[],
+  ints: @[],
+))
+
+var bar = (
+  num: 7,
+  strings: @[],
+  ints: @[],
+).MyTuple
+
+var fooUnnamed = MyTuple((7, @[], @[]))
+var n = 7
+var fooSym = MyTuple((num: n, strings: @[], ints: @[]))