Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core/adt: Combine Vertex.Structs when inserting Conjunct for evalv3
Two issues: 1. The old evalv2 code, in nodeContext.addValueConjunct, does combine Vertex.Structs if the value being merged in is a Vertex. But the new evalv3 code, in nodeContext.insertValueConjunct, did not do that. Add the necessary code. 2. Even with (1), Vertex Structs from core/convert were being trimmed out because the StructLits were not initialised. So make sure whenever we create an adt.StructLit, in convert, we Initialize it. Outcome: Vertices that are returned from builtin functions, such as time.Split, which have StructInfos/StructLits which themselves contain field ordering information, are no longer lost. Consequently, toposort orders such vertex fields correctly, matching the field order in the Go struct declaration. Fixes #3554. Better than before. Signed-off-by: Matthew Sackman <[email protected]> Change-Id: I5bb7ad09c328495758ed454fd539cf20fd550ef8 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1208079 TryBot-Result: CUEcueckoo <[email protected]> Reviewed-by: Marcel van Lohuizen <[email protected]>
- Loading branch information