blob: 9c90fdf048bd2f681f7f89a17f768f52859ba6bf [file] [log] [blame]
! cue eval genfield.cue
cmp stderr expect-stderr
-- frontmatter.toml --
title = "Interpolation of Field Names"
description = ""
-- text.md --
String interpolations may also be used in field names.
One cannot refer to generated fields with references.
-- genfield.cue --
sandwich: {
type: "Cheese"
"has\(type)": true
hasButter: true
butterAndCheese: hasButter && hasCheese
}
-- expect-stderr --
sandwich.butterAndCheese: reference "hasCheese" not found:
./genfield.cue:5:35