# TODO: revert to cue eval -i post fix for #1786
! exec cue eval -c defs.cue
cmp stderr expect-stderr

-- frontmatter.toml --
title = "Definitions"
description = ""

-- text.md --
A definition, indicated by an identifier starting with `#` or `_#`,
defines values that
are not output when converting a configuration to a concrete value.
They are used to define schema against which concrete values can
be validated.

Structs defined by definitions are implicitly closed.

-- defs.cue --
msg: "Hello \(#Name)!"

#Name: "world"

#A: {
    field: int
}

a:   #A & { field: 3 }
err: #A & { feild: 3 }

-- expect-stderr --
err.feild: field not allowed:
    ./defs.cue:5:5
    ./defs.cue:10:6
    ./defs.cue:10:13
