1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
-- in.cue --
t1: {
#R: {
pos: uint
name: "hello_\(pos)"
}
a: #R & {pos: 67}
}
t2: {
#R: {
pos: string
name: "hello_\(pos)"
}
a: #R & {pos: "a"}
}
-- out/eval/stats --
Leaks: 0
Freed: 15
Reused: 11
Allocs: 4
Retain: 0
Unifications: 15
Conjuncts: 29
Disjuncts: 15
-- out/eval --
(struct){
t1: (struct){
#R: (#struct){
pos: (int){ &(>=0, int) }
name: (_|_){
// [incomplete] t1.#R.name: invalid interpolation: non-concrete value >=0 & int (type int):
// ./in.cue:4:9
}
}
a: (#struct){
pos: (int){ 67 }
name: (string){ "hello_67" }
}
}
t2: (struct){
#R: (#struct){
pos: (string){ string }
name: (_|_){
// [incomplete] t2.#R.name: invalid interpolation: non-concrete value string (type string):
// ./in.cue:11:9
// ./in.cue:10:9
}
}
a: (#struct){
pos: (string){ "a" }
name: (string){ "hello_a" }
}
}
}
-- out/compile --
--- in.cue
{
t1: {
#R: {
pos: &(int, >=0)
name: "hello_\(〈0;pos〉)"
}
a: (〈0;#R〉 & {
pos: 67
})
}
t2: {
#R: {
pos: string
name: "hello_\(〈0;pos〉)"
}
a: (〈0;#R〉 & {
pos: "a"
})
}
}
|