Skip to content

Commit

Permalink
internal/core/adt: fix handling of top
Browse files Browse the repository at this point in the history
V3 had some logic to mimic some behavior in V2.
Not only was this implementation erroneous, leading
to spurious errors, but, as it turns out, the original
V2 behavior is also incorrect.

Basically, _ means any and is interpretted as a more
general version of {...}. That means, it is assumed to
define the full domain of fields. Interpreting it differently
breaks CUE in many ways. V2 handled this inconsistently
and sometimes assumed that fields were not defined
until a struct is closed.

There is a place for either interpretation, but for now we
will adopt the more relaxed interpretation.

Issue #3649
Issue #3706

Signed-off-by: Marcel van Lohuizen <[email protected]>
Change-Id: Ib30363c606aaf3ee99b4afa47fd93abc5166ebe0
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1208487
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Daniel Martí <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
  • Loading branch information
mpvl committed Feb 7, 2025
1 parent b582d7f commit 433e3c3
Show file tree
Hide file tree
Showing 5 changed files with 323 additions and 313 deletions.
Loading

0 comments on commit 433e3c3

Please sign in to comment.