internal/core/export: add failing test for issue #4254
cue def --inline-imports renames hidden identifiers in for-clause
sources but not the corresponding binding variables, producing
broken references.
In other words, the loop in the inlined imported package
for _v in data
for _v in _v {
_v
}
gets emitted as invalid CUE like
for _v in data
for _v in _v_HASH {
_v_HASH
}
where the references are rewritten as `cue def --inline-imports` should,
but the declarations do not, leading to inconsistency.
For #4254.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: Ibc8f87c0ca607c914991ebd832d708c263878eb5
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1231148
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Matthew Sackman <matthew@cue.works>