Skip to content

Commit

Permalink
Remove unneccessary copyTree
Browse files Browse the repository at this point in the history
  • Loading branch information
Clyybber committed Oct 22, 2019
1 parent 3e84084 commit 75011b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/transf.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ proc transform(c: PTransf, n: PNode): PTransNode =
providedFields.add n[i][0].sym
res.add initDefaultFields(obj, (if obj.typ.kind == tyRef: obj.typ[0].n else: obj.typ.n), providedFields)
n.sons.setLen(1)
res.add copyTree(obj)
res.add obj
result = PTransNode(res)
else:
result = transformSons(c, n)
Expand Down

0 comments on commit 75011b4

Please sign in to comment.