# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: list arithmetic
#evalPartial
-- in.cue --
list: [1, 2, 3]
mul0: list * 0
mul1: list * 1
mul2: 2 * list
list1: [1]
mul1_0: list1 * 0
mul1_1: 1 * list1
mul1_2: list1 * 2
add1_2: list + list1
e:      list * -1
-- out/def --
list: [1, 2, 3]
mul0: []
mul1: [1, 2, 3]
mul2: [1, 2, 3, 1, 2, 3]
list1: [1]
mul1_0: []
mul1_1: [1]
mul1_2: [1, 1]
e: _|_ // negative number -1 multiplies list
-- out/legacy-debug --
<0>{list: [1,2,3], mul0: [], mul1: [1,2,3], mul2: [1,2,3,1,2,3], list1: [1], mul1_0: [], mul1_1: [1], mul1_2: [1,1], e: _|_((<1>.list * -1):negative number -1 multiplies list)}
-- out/compile --
--- in.cue
{
  list: [
    1,
    2,
    3,
  ]
  mul0: (〈0;list〉 * 0)
  mul1: (〈0;list〉 * 1)
  mul2: (2 * 〈0;list〉)
  list1: [
    1,
  ]
  mul1_0: (〈0;list1〉 * 0)
  mul1_1: (1 * 〈0;list1〉)
  mul1_2: (〈0;list1〉 * 2)
  add1_2: (〈0;list〉 + 〈0;list1〉)
  e: (〈0;list〉 * -1)
}
-- out/eval/stats --
Leaks:  7
Freed:  31
Reused: 28
Allocs: 10
Retain: 7

Unifications: 38
Conjuncts:    77
Disjuncts:    38
-- out/eval --
Errors:
e: cannot convert negative number to uint64:
    ./in.cue:10:9

Result:
(_|_){
  // [eval]
  list: (#list){
    0: (int){ 1 }
    1: (int){ 2 }
    2: (int){ 3 }
  }
  mul0: (#list){
  }
  mul1: (#list){
    0: (int){ 1 }
    1: (int){ 2 }
    2: (int){ 3 }
  }
  mul2: (#list){
    0: (int){ 1 }
    1: (int){ 2 }
    2: (int){ 3 }
    3: (int){ 1 }
    4: (int){ 2 }
    5: (int){ 3 }
  }
  list1: (#list){
    0: (int){ 1 }
  }
  mul1_0: (#list){
  }
  mul1_1: (#list){
    0: (int){ 1 }
  }
  mul1_2: (#list){
    0: (int){ 1 }
    1: (int){ 1 }
  }
  add1_2: (#list){
    0: (int){ 1 }
    1: (int){ 2 }
    2: (int){ 3 }
    3: (int){ 1 }
  }
  e: (_|_){
    // [eval] e: cannot convert negative number to uint64:
    //     ./in.cue:10:9
  }
}