blob: 06a2adc89d14caaf5ea9aa2ea7fa846e959ff959 [file] [log] [blame]
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: interpolation
#evalPartial
-- in.cue --
a: "\(4)"
b: "one \(a) two \( a+c )"
c: "one"
d: "\(r)"
u: "\(_)"
r: _
e: "\([])"
-- out/def --
a: "4"
b: "one 4 two 4one"
c: "one"
d: "\(r)"
r: _
u: "\(_)"
e: _|_ // expression in interpolation must evaluate to a number kind or string (found list)
-- out/legacy-debug --
<0>{a: "4", b: "one 4 two 4one", c: "one", d: ""+<1>.r+"", r: _, u: ""+_+"", e: _|_([]:expression in interpolation must evaluate to a number kind or string (found list))}
-- out/compile --
--- in.cue
{
a: "\(4)"
b: "one \(〈0;a〉) two \((〈0;a〉 + 〈0;c〉))"
c: "one"
d: "\(〈0;r〉)"
u: "\(_)"
r: _
e: "\([])"
}
-- out/eval --
Errors:
e: invalid interpolation: cannot use [] (type list) as type string:
./in.cue:7:4
Result:
(_|_){
// [eval]
a: (string){ "4" }
b: (string){ "one 4 two 4one" }
c: (string){ "one" }
d: (_|_){
// [incomplete] d: invalid interpolation: incomplete string value '_':
// ./in.cue:4:4
}
u: (_|_){
// [incomplete] u: invalid interpolation: incomplete string value '_':
// ./in.cue:5:4
}
r: (_){ _ }
e: (_|_){
// [eval] e: invalid interpolation: cannot use [] (type list) as type string:
// ./in.cue:7:4
}
}