-- in.cue --
 let A = 3 * 3
let B = A + A
let C = B + B
let D = C + C
let E = D + D
let F = E + E
b: {
	let G = F + F
	let H = G + G
	let I = H + H
	let J = I + I
	let K = J + J
	let L = K + K
	let M = L + L
	let N = M + M
	let O = N + N
	let P = O + O
	let Q = P + P
	let R = Q + Q
	let S = R + R
	let T = S + S

	a: T
	b: F
}
issue1828: {
	volumes: L3

	let L3 = {
		for v2 in [for v1 in L2 {}] {}
	}

	let L2 = L1
	let L1 = []
}
ignoreErrorInLet: {
	let X = 1 & 2
	disjunction: *X | 3
}
-- incomprehension.cue --
// for comprehensions in list do not have to split the let as each instance
// is already associated with a separate environment.
list: {
	l: [ 1, 2, 3 ]
	c: [
		for v in l {
			let X = v*4 // can share
			X
		}
	]
}

referencesForDirectly: {
	l: [ 1, 2, 3 ]
	for k, v in l {
		let Y = v*4 // multi
		"\(k)": Y
	}
}

referencesForViaLet: {
	l: [ 1, 2, 3 ]
	for k, v in l let X = v*4 {
		let Y = X // multi
		"\(k)": Y
	}
}

letClauseReferencesInert: {
	x: 2
	l: [ 1, 2, 3 ]
	for k, v in l let X = x {
		let Y = X // can share
		"\(k)": Y
	}
}

// for indirect references, it is okay to not "split" a let clause, as the
// it will only fail as a result of not splitting if the referred values
// would fail as well.
indirectReference: {
	l: [ 1, 2, 3 ]
	for k, v in l {
		y: v // fails if v differs for each y.
		let X = y*4 // can share, as y fails if let fails.
		"\(k)": X
	}
}

nestedFor: {
	for k, y in [ 4, 5 ] {
		let X = {
			for x in [ 1, 2 ] {
				let X = x
				"\(X)": X
			}
		}
		"\(k)": X
	}
}

-- issue2166.cue --
letWithDynamicInComprehension: {
	_i: {
		a: "d"
		b: "e"
	}

	for k, v in _i {
		let T = v
		(T): "1"
	}
}
-- issue2218.cue --
_parent_configs: {
	PARENT: true
}
_configs: {
	CHILD1: {
		property: true
	}
	CHILD2: {
		property: true
		parent:      "PARENT"
	}
}
disabled_parent_test: {for k, v in _configs {
	let parent_config = (*_parent_configs[v.parent] | false)
	"\(k)": {
		"parent_config": parent_config
	}
}}
-- issue2063.cue --
import (
	"encoding/yaml"
	"strings"
)

// Issue #2063
keepDescending: t1: {
	ec: {}
	bs: {
		let m = ec.b
		if m == _|_ { }
		x: y: ""
	}
}

keepDescending: t2: {
	x: yaml.Marshal(bs)

	ec: {}
	bs: {
		let m = ec.b
		if m.b == _|_ { }
		X: Y: strings.Join([], "")
	}
}
-- out/evalalpha --
Errors:
indirectReference.y: conflicting values 2 and 1:
    ./incomprehension.cue:42:7
    ./incomprehension.cue:42:10
indirectReference.y: conflicting values 3 and 1:
    ./incomprehension.cue:42:7
    ./incomprehension.cue:42:13

Result:
(_|_){
  // [eval]
  let A#1 = (int){ 9 }
  let B#2 = (int){ 18 }
  let C#3 = (int){ 36 }
  let D#4 = (int){ 72 }
  let E#5 = (int){ 144 }
  let F#6 = (int){ 288 }
  b: (struct){
    let G#7 = (int){ 576 }
    let H#8 = (int){ 1152 }
    let I#9 = (int){ 2304 }
    let J#A = (int){ 4608 }
    let K#B = (int){ 9216 }
    let L#C = (int){ 18432 }
    let M#D = (int){ 36864 }
    let N#E = (int){ 73728 }
    let O#F = (int){ 147456 }
    let P#10 = (int){ 294912 }
    let Q#11 = (int){ 589824 }
    let R#12 = (int){ 1179648 }
    let S#13 = (int){ 2359296 }
    let T#14 = (int){ 4718592 }
    a: (int){ 4718592 }
    b: (int){ 288 }
  }
  issue1828: (struct){
    volumes: (struct){
    }
    let L3#15 = (struct){
    }
    let L2#16 = (#list){
    }
    let L1#17 = (#list){
    }
  }
  ignoreErrorInLet: (struct){
    let X#18 = (_|_){
      // [eval] ignoreErrorInLet.X: conflicting values 2 and 1:
      //     ./in.cue:37:10
      //     ./in.cue:37:14
    }
    disjunction: (int){ 3 }
  }
  list: (struct){
    l: (#list){
      0: (int){ 1 }
      1: (int){ 2 }
      2: (int){ 3 }
    }
    c: (#list){
      0: (int){
        4
        let X#19 = (int){ 4 }
      }
      1: (int){
        8
        let X#19 = (int){ 8 }
      }
      2: (int){
        12
        let X#19 = (int){ 12 }
      }
    }
  }
  referencesForDirectly: (struct){
    l: (#list){
      0: (int){ 1 }
      1: (int){ 2 }
      2: (int){ 3 }
    }
    let Y#1Amulti = (〈1;v〉 * 4)
    "0": (int){ 4 }
    "1": (int){ 8 }
    "2": (int){ 12 }
  }
  referencesForViaLet: (struct){
    l: (#list){
      0: (int){ 1 }
      1: (int){ 2 }
      2: (int){ 3 }
    }
    let Y#1Bmulti = 〈1;X〉
    "0": (int){ 4 }
    "1": (int){ 8 }
    "2": (int){ 12 }
  }
  letClauseReferencesInert: (struct){
    x: (int){ 2 }
    l: (#list){
      0: (int){ 1 }
      1: (int){ 2 }
      2: (int){ 3 }
    }
    let Y#1Cmulti = 〈1;X〉
    "0": (int){ 2 }
    "1": (int){ 2 }
    "2": (int){ 2 }
  }
  indirectReference: (_|_){
    // [eval]
    l: (#list){
      0: (int){ 1 }
      1: (int){ 2 }
      2: (int){ 3 }
    }
    y: (_|_){
      // [eval] indirectReference.y: conflicting values 2 and 1:
      //     ./incomprehension.cue:42:7
      //     ./incomprehension.cue:42:10
      // indirectReference.y: conflicting values 3 and 1:
      //     ./incomprehension.cue:42:7
      //     ./incomprehension.cue:42:13
    }
    let X#1Dmulti = (〈0;y〉 * 4)
    "0": (_|_){
      // [eval] indirectReference.y: conflicting values 2 and 1:
      //     ./incomprehension.cue:42:7
      //     ./incomprehension.cue:42:10
      // indirectReference.y: conflicting values 3 and 1:
      //     ./incomprehension.cue:42:7
      //     ./incomprehension.cue:42:13
    }
    "1": (_|_){
      // [eval] indirectReference.y: conflicting values 2 and 1:
      //     ./incomprehension.cue:42:7
      //     ./incomprehension.cue:42:10
      // indirectReference.y: conflicting values 3 and 1:
      //     ./incomprehension.cue:42:7
      //     ./incomprehension.cue:42:13
    }
    "2": (_|_){
      // [eval] indirectReference.y: conflicting values 2 and 1:
      //     ./incomprehension.cue:42:7
      //     ./incomprehension.cue:42:10
      // indirectReference.y: conflicting values 3 and 1:
      //     ./incomprehension.cue:42:7
      //     ./incomprehension.cue:42:13
    }
  }
  nestedFor: (struct){
    let X#1Emulti = {
      for _, x in [
        1,
        2,
      ] {
        let X#1Fmulti = 〈1;x〉
        "\(〈0;let X#1F〉)": 〈0;let X#1F〉
      }
    }
    "0": (struct){
      let X#1Fmulti = 〈1;x〉
      "1": (int){ 1 }
      "2": (int){ 2 }
    }
    "1": (struct){
      let X#1Fmulti = 〈1;x〉
      "1": (int){ 1 }
      "2": (int){ 2 }
    }
  }
  keepDescending: (struct){
    t1: (struct){
      ec: (struct){
      }
      bs: (struct){
        let m#21 = (_|_){
          // [incomplete] keepDescending.t1.bs.m: undefined field: b:
          //     ./issue2063.cue:10:14
        }
        x: (struct){
          y: (string){ "" }
        }
      }
    }
    t2: (struct){
      x: (string){ "X:\n  \"Y\": \"\"\n" }
      ec: (struct){
      }
      bs: (struct){
        let m#22 = (_|_){
          // [incomplete] keepDescending.t2.bs.m: undefined field: b:
          //     ./issue2063.cue:21:14
        }
        X: (struct){
          Y: (string){ "" }
        }
      }
    }
  }
  letWithDynamicInComprehension: (struct){
    _i: (struct){
      a: (string){ "d" }
      b: (string){ "e" }
    }
    let T#23multi = 〈1;v〉
    e: (string){ "1" }
    d: (string){ "1" }
  }
  _parent_configs: (struct){
    PARENT: (bool){ true }
  }
  _configs: (struct){
    CHILD1: (struct){
      property: (bool){ true }
    }
    CHILD2: (struct){
      property: (bool){ true }
      parent: (string){ "PARENT" }
    }
  }
  disabled_parent_test: (struct){
    let parent_config#24multi = (*〈3;_parent_configs〉[〈1;v〉.parent]|false)
    CHILD1: (struct){
      parent_config: (bool){ false }
    }
    CHILD2: (struct){
      parent_config: (bool){ |(*(bool){ true }, (bool){ false }) }
    }
  }
}
-- diff/-out/evalalpha<==>+out/eval --
diff old new
--- old
+++ new
@@ -2,13 +2,9 @@
 indirectReference.y: conflicting values 2 and 1:
     ./incomprehension.cue:42:7
     ./incomprehension.cue:42:10
-    ./incomprehension.cue:43:2
-    ./incomprehension.cue:44:6
 indirectReference.y: conflicting values 3 and 1:
     ./incomprehension.cue:42:7
     ./incomprehension.cue:42:13
-    ./incomprehension.cue:43:2
-    ./incomprehension.cue:44:6
 
 Result:
 (_|_){
@@ -105,7 +101,7 @@
       1: (int){ 2 }
       2: (int){ 3 }
     }
-    let Y#1C = (int){ 2 }
+    let Y#1Cmulti = 〈1;X〉
     "0": (int){ 2 }
     "1": (int){ 2 }
     "2": (int){ 2 }
@@ -121,61 +117,34 @@
       // [eval] indirectReference.y: conflicting values 2 and 1:
       //     ./incomprehension.cue:42:7
       //     ./incomprehension.cue:42:10
-      //     ./incomprehension.cue:43:2
-      //     ./incomprehension.cue:44:6
-      // indirectReference.y: conflicting values 3 and 1:
-      //     ./incomprehension.cue:42:7
-      //     ./incomprehension.cue:42:13
-      //     ./incomprehension.cue:43:2
-      //     ./incomprehension.cue:44:6
-    }
-    let X#1D = (_|_){
-      // [eval] indirectReference.y: conflicting values 2 and 1:
-      //     ./incomprehension.cue:42:7
-      //     ./incomprehension.cue:42:10
-      //     ./incomprehension.cue:43:2
-      //     ./incomprehension.cue:44:6
-      // indirectReference.y: conflicting values 3 and 1:
-      //     ./incomprehension.cue:42:7
-      //     ./incomprehension.cue:42:13
-      //     ./incomprehension.cue:43:2
-      //     ./incomprehension.cue:44:6
-    }
+      // indirectReference.y: conflicting values 3 and 1:
+      //     ./incomprehension.cue:42:7
+      //     ./incomprehension.cue:42:13
+    }
+    let X#1Dmulti = (〈0;y〉 * 4)
     "0": (_|_){
       // [eval] indirectReference.y: conflicting values 2 and 1:
       //     ./incomprehension.cue:42:7
       //     ./incomprehension.cue:42:10
-      //     ./incomprehension.cue:43:2
-      //     ./incomprehension.cue:44:6
-      // indirectReference.y: conflicting values 3 and 1:
-      //     ./incomprehension.cue:42:7
-      //     ./incomprehension.cue:42:13
-      //     ./incomprehension.cue:43:2
-      //     ./incomprehension.cue:44:6
+      // indirectReference.y: conflicting values 3 and 1:
+      //     ./incomprehension.cue:42:7
+      //     ./incomprehension.cue:42:13
     }
     "1": (_|_){
       // [eval] indirectReference.y: conflicting values 2 and 1:
       //     ./incomprehension.cue:42:7
       //     ./incomprehension.cue:42:10
-      //     ./incomprehension.cue:43:2
-      //     ./incomprehension.cue:44:6
-      // indirectReference.y: conflicting values 3 and 1:
-      //     ./incomprehension.cue:42:7
-      //     ./incomprehension.cue:42:13
-      //     ./incomprehension.cue:43:2
-      //     ./incomprehension.cue:44:6
+      // indirectReference.y: conflicting values 3 and 1:
+      //     ./incomprehension.cue:42:7
+      //     ./incomprehension.cue:42:13
     }
     "2": (_|_){
       // [eval] indirectReference.y: conflicting values 2 and 1:
       //     ./incomprehension.cue:42:7
       //     ./incomprehension.cue:42:10
-      //     ./incomprehension.cue:43:2
-      //     ./incomprehension.cue:44:6
-      // indirectReference.y: conflicting values 3 and 1:
-      //     ./incomprehension.cue:42:7
-      //     ./incomprehension.cue:42:13
-      //     ./incomprehension.cue:43:2
-      //     ./incomprehension.cue:44:6
+      // indirectReference.y: conflicting values 3 and 1:
+      //     ./incomprehension.cue:42:7
+      //     ./incomprehension.cue:42:13
     }
   }
   nestedFor: (struct){
@@ -234,8 +203,8 @@
       b: (string){ "e" }
     }
     let T#23multi = 〈1;v〉
-    d: (string){ "1" }
     e: (string){ "1" }
+    d: (string){ "1" }
   }
   _parent_configs: (struct){
     PARENT: (bool){ true }
-- out/eval/stats --
Leaks:  52
Freed:  158
Reused: 149
Allocs: 61
Retain: 184

Unifications: 196
Conjuncts:    365
Disjuncts:    241
-- out/eval --
Errors:
indirectReference.y: conflicting values 2 and 1:
    ./incomprehension.cue:42:7
    ./incomprehension.cue:42:10
    ./incomprehension.cue:43:2
    ./incomprehension.cue:44:6
indirectReference.y: conflicting values 3 and 1:
    ./incomprehension.cue:42:7
    ./incomprehension.cue:42:13
    ./incomprehension.cue:43:2
    ./incomprehension.cue:44:6

Result:
(_|_){
  // [eval]
  let A#1 = (int){ 9 }
  let B#2 = (int){ 18 }
  let C#3 = (int){ 36 }
  let D#4 = (int){ 72 }
  let E#5 = (int){ 144 }
  let F#6 = (int){ 288 }
  b: (struct){
    let G#7 = (int){ 576 }
    let H#8 = (int){ 1152 }
    let I#9 = (int){ 2304 }
    let J#A = (int){ 4608 }
    let K#B = (int){ 9216 }
    let L#C = (int){ 18432 }
    let M#D = (int){ 36864 }
    let N#E = (int){ 73728 }
    let O#F = (int){ 147456 }
    let P#10 = (int){ 294912 }
    let Q#11 = (int){ 589824 }
    let R#12 = (int){ 1179648 }
    let S#13 = (int){ 2359296 }
    let T#14 = (int){ 4718592 }
    a: (int){ 4718592 }
    b: (int){ 288 }
  }
  issue1828: (struct){
    volumes: (struct){
    }
    let L3#15 = (struct){
    }
    let L2#16 = (#list){
    }
    let L1#17 = (#list){
    }
  }
  ignoreErrorInLet: (struct){
    let X#18 = (_|_){
      // [eval] ignoreErrorInLet.X: conflicting values 2 and 1:
      //     ./in.cue:37:10
      //     ./in.cue:37:14
    }
    disjunction: (int){ 3 }
  }
  list: (struct){
    l: (#list){
      0: (int){ 1 }
      1: (int){ 2 }
      2: (int){ 3 }
    }
    c: (#list){
      0: (int){
        4
        let X#19 = (int){ 4 }
      }
      1: (int){
        8
        let X#19 = (int){ 8 }
      }
      2: (int){
        12
        let X#19 = (int){ 12 }
      }
    }
  }
  referencesForDirectly: (struct){
    l: (#list){
      0: (int){ 1 }
      1: (int){ 2 }
      2: (int){ 3 }
    }
    let Y#1Amulti = (〈1;v〉 * 4)
    "0": (int){ 4 }
    "1": (int){ 8 }
    "2": (int){ 12 }
  }
  referencesForViaLet: (struct){
    l: (#list){
      0: (int){ 1 }
      1: (int){ 2 }
      2: (int){ 3 }
    }
    let Y#1Bmulti = 〈1;X〉
    "0": (int){ 4 }
    "1": (int){ 8 }
    "2": (int){ 12 }
  }
  letClauseReferencesInert: (struct){
    x: (int){ 2 }
    l: (#list){
      0: (int){ 1 }
      1: (int){ 2 }
      2: (int){ 3 }
    }
    let Y#1C = (int){ 2 }
    "0": (int){ 2 }
    "1": (int){ 2 }
    "2": (int){ 2 }
  }
  indirectReference: (_|_){
    // [eval]
    l: (#list){
      0: (int){ 1 }
      1: (int){ 2 }
      2: (int){ 3 }
    }
    y: (_|_){
      // [eval] indirectReference.y: conflicting values 2 and 1:
      //     ./incomprehension.cue:42:7
      //     ./incomprehension.cue:42:10
      //     ./incomprehension.cue:43:2
      //     ./incomprehension.cue:44:6
      // indirectReference.y: conflicting values 3 and 1:
      //     ./incomprehension.cue:42:7
      //     ./incomprehension.cue:42:13
      //     ./incomprehension.cue:43:2
      //     ./incomprehension.cue:44:6
    }
    let X#1D = (_|_){
      // [eval] indirectReference.y: conflicting values 2 and 1:
      //     ./incomprehension.cue:42:7
      //     ./incomprehension.cue:42:10
      //     ./incomprehension.cue:43:2
      //     ./incomprehension.cue:44:6
      // indirectReference.y: conflicting values 3 and 1:
      //     ./incomprehension.cue:42:7
      //     ./incomprehension.cue:42:13
      //     ./incomprehension.cue:43:2
      //     ./incomprehension.cue:44:6
    }
    "0": (_|_){
      // [eval] indirectReference.y: conflicting values 2 and 1:
      //     ./incomprehension.cue:42:7
      //     ./incomprehension.cue:42:10
      //     ./incomprehension.cue:43:2
      //     ./incomprehension.cue:44:6
      // indirectReference.y: conflicting values 3 and 1:
      //     ./incomprehension.cue:42:7
      //     ./incomprehension.cue:42:13
      //     ./incomprehension.cue:43:2
      //     ./incomprehension.cue:44:6
    }
    "1": (_|_){
      // [eval] indirectReference.y: conflicting values 2 and 1:
      //     ./incomprehension.cue:42:7
      //     ./incomprehension.cue:42:10
      //     ./incomprehension.cue:43:2
      //     ./incomprehension.cue:44:6
      // indirectReference.y: conflicting values 3 and 1:
      //     ./incomprehension.cue:42:7
      //     ./incomprehension.cue:42:13
      //     ./incomprehension.cue:43:2
      //     ./incomprehension.cue:44:6
    }
    "2": (_|_){
      // [eval] indirectReference.y: conflicting values 2 and 1:
      //     ./incomprehension.cue:42:7
      //     ./incomprehension.cue:42:10
      //     ./incomprehension.cue:43:2
      //     ./incomprehension.cue:44:6
      // indirectReference.y: conflicting values 3 and 1:
      //     ./incomprehension.cue:42:7
      //     ./incomprehension.cue:42:13
      //     ./incomprehension.cue:43:2
      //     ./incomprehension.cue:44:6
    }
  }
  nestedFor: (struct){
    let X#1Emulti = {
      for _, x in [
        1,
        2,
      ] {
        let X#1Fmulti = 〈1;x〉
        "\(〈0;let X#1F〉)": 〈0;let X#1F〉
      }
    }
    "0": (struct){
      let X#1Fmulti = 〈1;x〉
      "1": (int){ 1 }
      "2": (int){ 2 }
    }
    "1": (struct){
      let X#1Fmulti = 〈1;x〉
      "1": (int){ 1 }
      "2": (int){ 2 }
    }
  }
  keepDescending: (struct){
    t1: (struct){
      ec: (struct){
      }
      bs: (struct){
        let m#21 = (_|_){
          // [incomplete] keepDescending.t1.bs.m: undefined field: b:
          //     ./issue2063.cue:10:14
        }
        x: (struct){
          y: (string){ "" }
        }
      }
    }
    t2: (struct){
      x: (string){ "X:\n  \"Y\": \"\"\n" }
      ec: (struct){
      }
      bs: (struct){
        let m#22 = (_|_){
          // [incomplete] keepDescending.t2.bs.m: undefined field: b:
          //     ./issue2063.cue:21:14
        }
        X: (struct){
          Y: (string){ "" }
        }
      }
    }
  }
  letWithDynamicInComprehension: (struct){
    _i: (struct){
      a: (string){ "d" }
      b: (string){ "e" }
    }
    let T#23multi = 〈1;v〉
    d: (string){ "1" }
    e: (string){ "1" }
  }
  _parent_configs: (struct){
    PARENT: (bool){ true }
  }
  _configs: (struct){
    CHILD1: (struct){
      property: (bool){ true }
    }
    CHILD2: (struct){
      property: (bool){ true }
      parent: (string){ "PARENT" }
    }
  }
  disabled_parent_test: (struct){
    let parent_config#24multi = (*〈3;_parent_configs〉[〈1;v〉.parent]|false)
    CHILD1: (struct){
      parent_config: (bool){ false }
    }
    CHILD2: (struct){
      parent_config: (bool){ |(*(bool){ true }, (bool){ false }) }
    }
  }
}
-- out/compile --
--- in.cue
{
  let A#1 = (3 * 3)
  let B#2 = (〈0;let A#1〉 + 〈0;let A#1〉)
  let C#3 = (〈0;let B#2〉 + 〈0;let B#2〉)
  let D#4 = (〈0;let C#3〉 + 〈0;let C#3〉)
  let E#5 = (〈0;let D#4〉 + 〈0;let D#4〉)
  let F#6 = (〈0;let E#5〉 + 〈0;let E#5〉)
  b: {
    let G#7 = (〈1;let F#6〉 + 〈1;let F#6〉)
    let H#8 = (〈0;let G#7〉 + 〈0;let G#7〉)
    let I#9 = (〈0;let H#8〉 + 〈0;let H#8〉)
    let J#A = (〈0;let I#9〉 + 〈0;let I#9〉)
    let K#B = (〈0;let J#A〉 + 〈0;let J#A〉)
    let L#C = (〈0;let K#B〉 + 〈0;let K#B〉)
    let M#D = (〈0;let L#C〉 + 〈0;let L#C〉)
    let N#E = (〈0;let M#D〉 + 〈0;let M#D〉)
    let O#F = (〈0;let N#E〉 + 〈0;let N#E〉)
    let P#10 = (〈0;let O#F〉 + 〈0;let O#F〉)
    let Q#11 = (〈0;let P#10〉 + 〈0;let P#10〉)
    let R#12 = (〈0;let Q#11〉 + 〈0;let Q#11〉)
    let S#13 = (〈0;let R#12〉 + 〈0;let R#12〉)
    let T#14 = (〈0;let S#13〉 + 〈0;let S#13〉)
    a: 〈0;let T#14〉
    b: 〈1;let F#6〉
  }
  issue1828: {
    volumes: 〈0;let L3#15〉
    let L3#15 = {
      for _, v2 in [
        for _, v1 in 〈2;let L2#16〉 {},
      ] {}
    }
    let L2#16 = 〈0;let L1#17〉
    let L1#17 = []
  }
  ignoreErrorInLet: {
    let X#18 = (1 & 2)
    disjunction: (*〈0;let X#18〉|3)
  }
}
--- incomprehension.cue
{
  list: {
    l: [
      1,
      2,
      3,
    ]
    c: [
      for _, v in 〈1;l〉 {
        let X#19 = (〈1;v〉 * 4)
        〈0;let X#19〉
      },
    ]
  }
  referencesForDirectly: {
    l: [
      1,
      2,
      3,
    ]
    for k, v in 〈0;l〉 {
      let Y#1Amulti = (〈1;v〉 * 4)
      "\(〈1;k〉)": 〈0;let Y#1A〉
    }
  }
  referencesForViaLet: {
    l: [
      1,
      2,
      3,
    ]
    for k, v in 〈0;l〉 let X = (〈0;v〉 * 4) {
      let Y#1Bmulti = 〈1;X〉
      "\(〈2;k〉)": 〈0;let Y#1B〉
    }
  }
  letClauseReferencesInert: {
    x: 2
    l: [
      1,
      2,
      3,
    ]
    for k, v in 〈0;l〉 let X = 〈1;x〉 {
      let Y#1C = 〈1;X〉
      "\(〈2;k〉)": 〈0;let Y#1C〉
    }
  }
  indirectReference: {
    l: [
      1,
      2,
      3,
    ]
    for k, v in 〈0;l〉 {
      y: 〈1;v〉
      let X#1D = (〈0;y〉 * 4)
      "\(〈1;k〉)": 〈0;let X#1D〉
    }
  }
  nestedFor: {
    for k, y in [
      4,
      5,
    ] {
      let X#1Emulti = {
        for _, x in [
          1,
          2,
        ] {
          let X#1Fmulti = 〈1;x〉
          "\(〈0;let X#1F〉)": 〈0;let X#1F〉
        }
      }
      "\(〈1;k〉)": 〈0;let X#1E〉
    }
  }
}
--- issue2063.cue
{
  keepDescending: {
    t1: {
      ec: {}
      bs: {
        let m#21 = 〈1;ec〉.b
        if (〈0;let m#21〉 == _|_(explicit error (_|_ literal) in source)) {}
        x: {
          y: ""
        }
      }
    }
  }
  keepDescending: {
    t2: {
      x: 〈import;"encoding/yaml"〉.Marshal(〈0;bs〉)
      ec: {}
      bs: {
        let m#22 = 〈1;ec〉.b
        if (〈0;let m#22〉.b == _|_(explicit error (_|_ literal) in source)) {}
        X: {
          Y: 〈import;strings〉.Join([], "")
        }
      }
    }
  }
}
--- issue2166.cue
{
  letWithDynamicInComprehension: {
    _i: {
      a: "d"
      b: "e"
    }
    for k, v in 〈0;_i〉 {
      let T#23multi = 〈1;v〉
      〈0;let T#23〉: "1"
    }
  }
}
--- issue2218.cue
{
  _parent_configs: {
    PARENT: true
  }
  _configs: {
    CHILD1: {
      property: true
    }
    CHILD2: {
      property: true
      parent: "PARENT"
    }
  }
  disabled_parent_test: {
    for k, v in 〈1;_configs〉 {
      let parent_config#24multi = (*〈3;_parent_configs〉[〈1;v〉.parent]|false)
      "\(〈1;k〉)": {
        parent_config: 〈1;let parent_config#24〉
      }
    }
  }
}
