summary refs log tree commit diff stats
path: root/tests/vm
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-09-18 09:38:28 +0200
committerGitHub <noreply@github.com>2018-09-18 09:38:28 +0200
commitaa2d219afe8592d3764f73e8771d1e13ac5ea55b (patch)
tree0f311901ac4b7dcdb6332f4cf602b8cbd0c34639 /tests/vm
parent597acad507f1acc8a50e9e98d83328a4c4dd8bda (diff)
parent027cc5013eedce70d5f925e18037e9d1786ebd15 (diff)
downloadNim-aa2d219afe8592d3764f73e8771d1e13ac5ea55b.tar.gz
Merge pull request #8995 from LemonBoy/fix-4952
Fix error during field access in VM
Diffstat (limited to 'tests/vm')
-rw-r--r--tests/vm/t4952.nim17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/vm/t4952.nim b/tests/vm/t4952.nim
new file mode 100644
index 000000000..fc76fa4df
--- /dev/null
+++ b/tests/vm/t4952.nim
@@ -0,0 +1,17 @@
+import macros
+
+proc doCheck(tree: NimNode) =
+  let res: tuple[n: NimNode] = (n: tree)
+  assert: tree.kind == res.n.kind
+  for sub in tree:
+    doCheck(sub)
+
+macro id(body: untyped): untyped =
+  doCheck(body)
+
+id(foo((i: int)))
+
+static:
+  let tree = newTree(nnkExprColonExpr)
+  let t = (n: tree)
+  assert: t.n.kind == tree.kind