diff --git a/compiler/ast.nim b/compiler/ast.nim index efb3ae909f..9708252f0e 100644 --- a/compiler/ast.nim +++ b/compiler/ast.nim @@ -1693,7 +1693,7 @@ proc copyNode*(src: PNode): PNode = template transitionNodeKindCommon(k: TNodeKind) = let obj {.inject.} = n[] - n[] = TNode(kind: k, typField: obj.typField, info: obj.info, flags: obj.flags) + n[] = TNode(kind: k, typField: n.typ, info: obj.info, flags: obj.flags) # n.comment = obj.comment # shouldn't be needed, the address doesnt' change when defined(useNodeIds): n.id = obj.id