We cannot get to this "someItem" object and assign a value to it. It has to do with how the cursor works.
To recreate
val eval = new Evaluator(1)
val insertSomeIndex1 = InsertAfter(EmptyMap)
val insertreg= Assign(new Str("someVal"))
eval evalExpr Doc() evalExpr Get("someVar") evalExpr Get("someVar2") evalExpr Idx(0) evalCmd insertSomeIndex1
eval evalExpr Doc() evalExpr Get("someVar") evalExpr Get("someVar2") evalExpr Idx(0) evalExpr Get("someVar3") evalCmd insertreg
var s:String = eval.toJsonString()
var expectedOutput = "<some expected output>"
assert(s == expectedOutput)
This is copy pasted from victorDev branch unit test
How to solve
When we build the cursor we use an identifierT(<int>) to mark and index of the array. This kind of sux. It would be better to have an idxT(<int>) or something to mark a traversal into an index of the array.
Watch out
Let's hope to the coding gods that the unit tests are properly written so that they cover when you add another datatype.
Also, watch out for tombstones. When you set an index of traversal, that should skip the tombstones.
About
We currently cannot get items from lists.
We cannot get to this "someItem" object and assign a value to it. It has to do with how the cursor works.
To recreate
This is copy pasted from
victorDev
branch unit testHow to solve
When we build the cursor we use an
identifierT(<int>)
to mark and index of the array. This kind of sux. It would be better to have anidxT(<int>)
or something to mark a traversal into an index of the array.Watch out
Let's hope to the coding gods that the unit tests are properly written so that they cover when you add another datatype.
Also, watch out for tombstones. When you set an index of traversal, that should skip the tombstones.