cuelang.org/go@v0.13.0/cue/testdata/builtins/args.txtar (about)

     1  -- in.cue --
     2  import (
     3  	"math"
     4  	"strings"
     5  )
     6  
     7  issue3584: reduced: t1: {
     8  	ref: out
     9  	trigger: *1 | 2
    10  	out: strings.SliceRunes("ABC", 0, trigger)
    11  }
    12  
    13  issue3584: reduced: t2: {
    14  	x: math.Abs(y)
    15  	y: *6 | 5
    16  }
    17  -- out/eval/stats --
    18  Leaks:  0
    19  Freed:  14
    20  Reused: 5
    21  Allocs: 9
    22  Retain: 1
    23  
    24  Unifications: 10
    25  Conjuncts:    17
    26  Disjuncts:    15
    27  -- out/eval --
    28  (struct){
    29    issue3584: (struct){
    30      reduced: (struct){
    31        t1: (struct){
    32          ref: (string){ "A" }
    33          trigger: (int){ |(*(int){ 1 }, (int){ 2 }) }
    34          out: (string){ "A" }
    35        }
    36        t2: (struct){
    37          x: (int){ 6 }
    38          y: (int){ |(*(int){ 6 }, (int){ 5 }) }
    39        }
    40      }
    41    }
    42  }
    43  -- out/compile --
    44  --- in.cue
    45  {
    46    issue3584: {
    47      reduced: {
    48        t1: {
    49          ref: 〈0;out〉
    50          trigger: (*1|2)
    51          out: 〈import;strings〉.SliceRunes("ABC", 0, 〈0;trigger〉)
    52        }
    53      }
    54    }
    55    issue3584: {
    56      reduced: {
    57        t2: {
    58          x: 〈import;math〉.Abs(〈0;y〉)
    59          y: (*6|5)
    60        }
    61      }
    62    }
    63  }