github.com/solo-io/cue@v0.4.7/cue/testdata/compile/labels.txtar (about) 1 -- in.cue -- 2 package compile 3 4 import "list" 5 6 dis1: "dev"|"prd" 7 dis2: *"dev"|"prd" 8 9 con1: string 10 let con2 = string 11 12 ok1: [string]: string 13 ok2: [name=string]: string 14 ok3: [con1]: string 15 ok3: [con2]: string 16 17 bad1: ["foo"]: string 18 bad2: [1]: string 19 bad3: [name=1]: string 20 bad4: [dis1]: string 21 bad5: [dis2]: string 22 bad6: [name=dis2]: string 23 bad7: [{foo: "bar"}]: string 24 bad8: [list.FlattenN([string], 1)]: string 25 bad9: [for x in [1,2,3] {x}]: string 26 27 -- out/compile -- 28 bad9: comprehension values not allowed in this position: 29 ./in.cue:24:8 30 --- in.cue 31 { 32 dis1: ("dev"|"prd") 33 dis2: (*"dev"|"prd") 34 con1: string 35 ok1: { 36 [string]: string 37 } 38 ok2: { 39 [string]: string 40 } 41 ok3: { 42 [〈1;con1〉]: string 43 } 44 ok3: { 45 [〈1;let con2〉]: string 46 } 47 bad1: { 48 ["foo"]: string 49 } 50 bad2: { 51 [1]: string 52 } 53 bad3: { 54 [1]: string 55 } 56 bad4: { 57 [〈1;dis1〉]: string 58 } 59 bad5: { 60 [〈1;dis2〉]: string 61 } 62 bad6: { 63 [〈1;dis2〉]: string 64 } 65 bad7: { 66 [{ 67 foo: "bar" 68 }]: string 69 } 70 bad8: { 71 [〈import;list〉.FlattenN([ 72 string, 73 ], 1)]: string 74 } 75 bad9: { 76 [_|_(comprehension values not allowed in this position)]: string 77 } 78 } 79 -- out/eval -- 80 bad9: comprehension values not allowed in this position: 81 ./in.cue:24:8