Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/core/adt: fix cycle in patterns
The finalized state of a node was set before processing patterns. This caused cycles in patterns to go unnoticed. Fixing this further exposed some issues with cycle detection in sharing: allowing cyclic nodes to share could make structure sharing go unnoticed. We now do not allow sharing in this case. Another issue was that clearing the Refs in a nonRooted struct could remove a necessary cycle detection. Issue #3476 Issue #2854 Issue #2850 Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com> Change-Id: Ibfbf716b9aa2b07ac83d0125a8e5188486eda4eb Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1202216 Reviewed-by: Matthew Sackman <matthew@cue.works> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
- Loading branch information