cuelang.org/go@v0.10.1/cue/testdata/basicrewrite/015_types.txtar (about)

     1  # DO NOT EDIT; generated by go run testdata/gen.go
     2  #
     3  #name: types
     4  #evalPartial
     5  -- in.cue --
     6  i:  int
     7  j:  int & 3
     8  s:  string
     9  t:  "s" & string
    10  e:  int & string
    11  e2: 1 & string
    12  b:  !int
    13  p:  +true
    14  m:  -false
    15  -- out/def --
    16  i:  int
    17  j:  3
    18  s:  string
    19  t:  "s"
    20  e:  _|_ // conflicting values int and string (mismatched types int and string)
    21  e2: _|_ // conflicting values 1 and string (mismatched types int and string)
    22  b:  _|_ // invalid operation !int (! int)
    23  p:  _|_ // invalid operation +true (+ bool)
    24  m:  _|_ // invalid operation -false (- bool)
    25  -- out/legacy-debug --
    26  <0>{i: int, j: 3, s: string, t: "s", e: _|_((int & string):conflicting values int and string (mismatched types int and string)), e2: _|_((1 & string):conflicting values 1 and string (mismatched types int and string)), b: _|_(!int:invalid operation !int (! int)), p: _|_(+true:invalid operation +true (+ bool)), m: _|_(-false:invalid operation -false (- bool))}
    27  -- out/compile --
    28  --- in.cue
    29  {
    30    i: int
    31    j: (int & 3)
    32    s: string
    33    t: ("s" & string)
    34    e: (int & string)
    35    e2: (1 & string)
    36    b: !int
    37    p: +true
    38    m: -false
    39  }
    40  -- out/eval/stats --
    41  Leaks:  0
    42  Freed:  10
    43  Reused: 8
    44  Allocs: 2
    45  Retain: 0
    46  
    47  Unifications: 10
    48  Conjuncts:    14
    49  Disjuncts:    10
    50  -- out/eval --
    51  Errors:
    52  b: invalid operand int ('!' requires concrete value):
    53      ./in.cue:7:6
    54  e: conflicting values int and string (mismatched types int and string):
    55      ./in.cue:5:5
    56      ./in.cue:5:11
    57  e2: conflicting values 1 and string (mismatched types int and string):
    58      ./in.cue:6:5
    59      ./in.cue:6:9
    60  p: invalid operation +true (+ bool):
    61      ./in.cue:8:5
    62  m: invalid operation -false (- bool):
    63      ./in.cue:9:5
    64  
    65  Result:
    66  (_|_){
    67    // [eval]
    68    i: (int){ int }
    69    j: (int){ 3 }
    70    s: (string){ string }
    71    t: (string){ "s" }
    72    e: (_|_){
    73      // [eval] e: conflicting values int and string (mismatched types int and string):
    74      //     ./in.cue:5:5
    75      //     ./in.cue:5:11
    76    }
    77    e2: (_|_){
    78      // [eval] e2: conflicting values 1 and string (mismatched types int and string):
    79      //     ./in.cue:6:5
    80      //     ./in.cue:6:9
    81    }
    82    b: (_|_){
    83      // [eval] b: invalid operand int ('!' requires concrete value):
    84      //     ./in.cue:7:6
    85    }
    86    p: (_|_){
    87      // [eval] p: invalid operation +true (+ bool):
    88      //     ./in.cue:8:5
    89    }
    90    m: (_|_){
    91      // [eval] m: invalid operation -false (- bool):
    92      //     ./in.cue:9:5
    93    }
    94  }