new operator ':=', it assigns a value to a variable by deep copy
This commit is contained in:
+1
-1
@@ -155,7 +155,7 @@ func (dict *DictType) GetItem(key any) (value any, exists bool) {
|
||||
func (dict *DictType) Clone() (c *DictType) {
|
||||
c = newDict(nil)
|
||||
for k, v := range *dict {
|
||||
(*c)[k] = v
|
||||
(*c)[k] = Clone(v)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user