# Tests that a label alias on a top-level field does not change the field's
# visibility from other files in the same package. The label alias form
# `A=foo: ...` should leave `foo` reachable from other files in package p.
# https://cuelang.org/issue/4312
-- one.cue --
package p

A=foo: "foo value"

one_alias: A
one_field: foo
-- two.cue --
package p

two_field: foo
-- out/compile --
--- one.cue
{
  foo: "foo value"
  one_alias: 〈0;foo〉
  one_field: 〈0;foo〉
}
--- two.cue
{
  two_field: 〈0;foo〉
}
