summary refs log tree commit diff stats
path: root/compiler/ast.nim
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2023-06-02 22:03:32 +0800
committerGitHub <noreply@github.com>2023-06-02 16:03:32 +0200
commit1133f20fe2c834d14454c32d7d9fc2cd1fe8ffa2 (patch)
tree6eb03f314132d5022d6ebfdc7d4b706dfa8cfb5f /compiler/ast.nim
parentead7e20926b1f5ea1b06679947d3d16fcc085e68 (diff)
downloadNim-1133f20fe2c834d14454c32d7d9fc2cd1fe8ffa2.tar.gz
lift the `=dup` hook (#21903)
* fixes tests again
* remove helper functions
* fixes closures, owned refs
* final cleanup
Diffstat (limited to 'compiler/ast.nim')
-rw-r--r--compiler/ast.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim
index b27b16fe2..2a5f18809 100644
--- a/compiler/ast.nim
+++ b/compiler/ast.nim
@@ -944,10 +944,10 @@ type
     attachedWasMoved,
     attachedDestructor,
     attachedAsgn,
+    attachedDup,
     attachedSink,
     attachedTrace,
-    attachedDeepCopy,
-    attachedDup
+    attachedDeepCopy
 
   TType* {.acyclic.} = object of TIdObj # \
                               # types are identical iff they have the
@@ -1518,7 +1518,7 @@ proc newProcNode*(kind: TNodeKind, info: TLineInfo, body: PNode,
 
 const
   AttachedOpToStr*: array[TTypeAttachedOp, string] = [
-    "=wasMoved", "=destroy", "=copy", "=sink", "=trace", "=deepcopy", "=dup"]
+    "=wasMoved", "=destroy", "=copy", "=dup", "=sink", "=trace", "=deepcopy"]
 
 proc `$`*(s: PSym): string =
   if s != nil: