Skip to content

Commit

Permalink
internal/core/adt: derive status from shared value
Browse files Browse the repository at this point in the history
In some cases a shared value may not be fully
evaluated before a referencing node completes.
In these cases, the status of a node may not
reflect the actual status.
This can be mitigated by dereferencing the
value and taking its status instead.

Signed-off-by: Marcel van Lohuizen <[email protected]>
Change-Id: I6f2f5eb3dba035311e103c0500c010734e12891d
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1202214
Reviewed-by: Matthew Sackman <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
  • Loading branch information
mpvl committed Oct 8, 2024
1 parent af68c6c commit f8c5520
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/core/adt/composite.go
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,7 @@ const (
)

func (v *Vertex) Status() vertexStatus {
v = v.DerefValue()
return v.status
}

Expand Down

0 comments on commit f8c5520

Please sign in to comment.