1、array reference test
:log warn "===Array reference test start...==="
:local arr1 [:toarray ""]
:local arr2 [:toarray ""]
:set ($arr1->"key1") 2
:log warn ("arr1 befare change=")
:log warn $arr1
:set ($arr2->"key2") $arr1
:set ($arr1->"key1") 3
:log warn ("arr1 after change=")
:log warn $arr1
:log warn ("arr1 in arr2(case1)=")
:log warn ($arr2->"key2")
:local tmparr ($arr2->"key2")
# get array from array2, and modify it.
:set ($tmparr->"key1") 4
:log warn ("arr1 in arr2(case2)=")
:log warn ($arr2->"key2")
:log warn "===Array reference test end...==="
The result(v6 vs v7):

It seems that when you put an array into another array, it will make a copy then put the new array into target array in v7. But in v6 it doesn’t make copy and just put it self into target array.
When get element from the array and modify it, you will get different result between v6 and v7(case2)
2、function parameter reference test
:log warn "===Function parameter test start...==="
:global func1 do={
:log warn "func1: p1 before change="
:log warn $p1
:set ($p1->"key1") 5
:log warn "func1: p1 after change="
:log warn $p1
}
:local arr1 [:toarray ""]
:set ($arr1->"key1") 2
:log warn "arr1 before call function="
:log warn $arr1
$func1 p1=$arr1
:log warn "arr1 after call function="
:log warn $arr1
:log warn "===Function parameter test end...==="
The result(v6 vs v7):

In v6, some type of variable(ex: array) can be passed as parameter to function, the you can modify the variable in the function, and the caller will get the same result for the variable which passed as parameter. It seems that this behavior was changed in v7.
So for the results of the tests above, which one is expected behavior? v6 or v7?
I have some scripts use the reference feature in v6 and hope it will also work on v7, thank you.