Expansion step 13.11 says:
If
container mappingincludes@listandexpanded valueis not already a list object, convertexpanded valueto a list object by first setting it to an array containing onlyexpanded valueif it is not already an array, and then by setting it to a map containing the key-value pair@list-expanded value.
In test t0004 I believe the recursive Expansion call in 13.9 for the mylist1 key will set expanded value to:
[
{
"@list": []
}
]The text in 13.11 will then turn this into a new map:
{
"@list": [
{
"@list": []
}
]
}instead of the value expected by the test:
[
{
"@list": []
}
]It's not clear to me where this double-@nest structure should be simplified. It seems related to 17.2 (which simplifies @set), and possibly to 19.1 which drops maps with only @value or @list keys, but *only when active property is null or @graph (which is not the case here).
I think this is because of the same issue as in #295, where the expansion algorithm would formerly return an object, now always returns an array. When it returned an object, then 13.11 would have seen a list object, not an array containing a list object.