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 counter related to close builtin
The spawnCloseContext used to pass isClosedOnce might never be incremented itself. As a result decDependent might never be called and the parent never decremented. We use the DEFER counter to agitate an increment and decrement after the conjunct is added. The case where the counter is removed is in builtins/default, most notably the line: Close: close(*{} | 0) Note that this also increases a counter, which is always a possibility. We deal with that later. Signed-off-by: Marcel van Lohuizen <[email protected]> Change-Id: I18e9759a7958addb36ad437b6be0f49f43d7ea6a Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1207519 TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
- Loading branch information