summary refs log tree commit diff stats
path: root/lib/core/macros.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2022-10-07 22:26:53 +0200
committerGitHub <noreply@github.com>2022-10-07 22:26:53 +0200
commite83f27e6a0f52f167e8eb91cd8f60be62d6725c6 (patch)
tree5e23e0c54abe38038405992deea1c234030d49b1 /lib/core/macros.nim
parenta132f5502acbd53781802579d89d6ca5168e74cd (diff)
downloadNim-e83f27e6a0f52f167e8eb91cd8f60be62d6725c6.tar.gz
out parameters: enforce that 'out' is only used as a parameter (#20510)
* out parameters: enforce that 'out' is only used as a parameter

* make tables.nim use 'out' parameters

* better backwards compat
Diffstat (limited to 'lib/core/macros.nim')
-rw-r--r--lib/core/macros.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/core/macros.nim b/lib/core/macros.nim
index cc2d5041e..595d4bab5 100644
--- a/lib/core/macros.nim
+++ b/lib/core/macros.nim
@@ -75,7 +75,7 @@ type
     nnkTupleTy, nnkTupleClassTy, nnkTypeClassTy, nnkStaticTy,
     nnkRecList, nnkRecCase, nnkRecWhen,
     nnkRefTy, nnkPtrTy, nnkVarTy,
-    nnkConstTy, nnkMutableTy,
+    nnkConstTy, nnkOutTy,
     nnkDistinctTy,
     nnkProcTy,
     nnkIteratorTy,         # iterator type
@@ -125,6 +125,9 @@ type
 
   TNimSymKinds* {.deprecated.} = set[NimSymKind]
 
+const
+  nnkMutableTy* {.deprecated.} = nnkOutTy
+
 type
   NimIdent* {.deprecated.} = object of RootObj
     ## Represents a Nim identifier in the AST. **Note**: This is only