summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2022-08-23 15:00:23 +0800
committerGitHub <noreply@github.com>2022-08-23 09:00:23 +0200
commit25c6491b657997d186f08c48be352ae98d9a3aac (patch)
treecdb3dd8b93c9903f5d4a12e5f77a817f7073b091
parent8fc19b9e1291017b89148a3747fa77efdaf040e2 (diff)
downloadNim-25c6491b657997d186f08c48be352ae98d9a3aac.tar.gz
fixes #20162; locals doesn't work with ORC [backport] (#20163)
fixes #20162; locals doesn't work with ORC
-rw-r--r--compiler/plugins/locals.nim2
-rw-r--r--tests/misc/tlocals.nim1
2 files changed, 2 insertions, 1 deletions
diff --git a/compiler/plugins/locals.nim b/compiler/plugins/locals.nim
index c03a6986e..384780f7b 100644
--- a/compiler/plugins/locals.nim
+++ b/compiler/plugins/locals.nim
@@ -15,7 +15,7 @@ import ".." / [ast, astalgo,
 proc semLocals*(c: PContext, n: PNode): PNode =
   var counter = 0
   var tupleType = newTypeS(tyTuple, c)
-  result = newNodeIT(nkPar, n.info, tupleType)
+  result = newNodeIT(nkTupleConstr, n.info, tupleType)
   tupleType.n = newNodeI(nkRecList, n.info)
   let owner = getCurrOwner(c)
   # for now we skip openarrays ...
diff --git a/tests/misc/tlocals.nim b/tests/misc/tlocals.nim
index a6df68224..e59976102 100644
--- a/tests/misc/tlocals.nim
+++ b/tests/misc/tlocals.nim
@@ -1,4 +1,5 @@
 discard """
+  matrix: "--mm:refc; --mm:orc"
   output: '''(x: "string here", a: 1)
 b is 5
 x is 12'''