-
Notifications
You must be signed in to change notification settings - Fork 299
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 dropping arcs with double and deep pushdowns
Consider this test case: if true { // order of these two lines matters a: b1.b2.b3 b1: b2: b3: "Foo" } Before, when finalizing a (a pushed down comprehension), this would cause b1 to encounter a "pending" arc and yield. As a result of yielding, though, the pending arcs would be marked as "not present", causing a completion of the reference to fail down the line. Now, we force recursive evaluation if we encounter a pending arc. A fully call-by-need evaluation would probably have prevented this issue. Note that this also improves a test in freeze.txtar. Previously an incomplete error was reported, but this would be valid on a call-by-need approach and in general is solvable. Fixes #3621 Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com> Change-Id: I2e8e59831594a9462089af0ecd17ab8a8b72d234 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1206325 Reviewed-by: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
- Loading branch information
Showing
4 changed files
with
91 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.