#Issue: 1509

# TODO: recognize when an unresolved value

# export
! exec cue export
cmp stderr expect-stderr1
cmp stdout expect-stdout1

# eval
exec cue eval
cmp stderr expect-stderr2
cmp stdout expect-stdout2

-- x.cue --
package x

import "list"

x: [1, 2, 3]
// This should be a fatal error, as the passed struct will never be
// able to contain `less` by making the configuration more concrete.
sortedx: list.Sort(x, {})

-- expect-stdout1 --
-- expect-stderr1 --
sortedx: error in call to list.Sort: field not found: less:
    ./x.cue:8:10
-- expect-stdout2 --
import "list"

x: [1, 2, 3]
sortedx: list.Sort(x, {})
-- expect-stderr2 --
