cuelang.org/go@v0.13.0/cue/testdata/resolve/023_correct_error_messages.txtar (about)

     1  #name: correct error messages
     2  #evalPartial
     3  -- in.cue --
     4  a: "a" & 1
     5  -- out/def --
     6  a: _|_ // conflicting values "a" and 1 (mismatched types string and int)
     7  -- out/legacy-debug --
     8  <0>{a: _|_(("a" & 1):conflicting values "a" and 1 (mismatched types string and int))}
     9  -- out/compile --
    10  --- in.cue
    11  {
    12    a: ("a" & 1)
    13  }
    14  -- out/eval/stats --
    15  Leaks:  0
    16  Freed:  2
    17  Reused: 0
    18  Allocs: 2
    19  Retain: 0
    20  
    21  Unifications: 2
    22  Conjuncts:    3
    23  Disjuncts:    2
    24  -- out/eval --
    25  Errors:
    26  a: conflicting values "a" and 1 (mismatched types string and int):
    27      ./in.cue:1:4
    28      ./in.cue:1:10
    29  
    30  Result:
    31  (_|_){
    32    // [eval]
    33    a: (_|_){
    34      // [eval] a: conflicting values "a" and 1 (mismatched types string and int):
    35      //     ./in.cue:1:4
    36      //     ./in.cue:1:10
    37    }
    38  }