avoid creating temporary in genObjConstr if possible (#7032)
This commit is contained in:
parent
2aebb8ed7e
commit
d0a9fac362
3 changed files with 45 additions and 17 deletions
|
|
@ -15,7 +15,8 @@ discard """
|
|||
(y: 678, x: 123)
|
||||
(y: 678, x: 123)
|
||||
(y: 0, x: 123)
|
||||
(y: 678, x: 123)'''
|
||||
(y: 678, x: 123)
|
||||
(y: 123, x: 678)'''
|
||||
"""
|
||||
|
||||
type
|
||||
|
|
@ -75,3 +76,7 @@ when true:
|
|||
echo b # (y: 0, x: 123)
|
||||
b=B(y: 678, x: 123)
|
||||
echo b # (y: 678, x: 123)
|
||||
b=B(y: b.x, x: b.y)
|
||||
echo b # (y: 123, x: 678)
|
||||
|
||||
GC_fullCollect()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue