internal/core/adt: clear close check
Builtin calls currently may still be evaluated
within a different OpContext. This means that
any closedness information attached to the
returned data is invalid. This is fine, as
regular builtin return values should be treated
as values. (This is different for non-concrete
builtins).
Note that such closedness information is still
handled correctly _within_ the builtin, and thus
there is still typo checking going on there.
Just the typo checking information of the
returned value can be ignored.
We now do this by resetting the closedness
information in newReq if we notice that the
value originates from a different context.
We introduce a helper function and use it in
other spots where the typo checking info was
previously closed.
Fixes #4000
Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: I0df7bc73498b6bd3cb14abc00f00d2a4038aac08
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1219265
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>