...

Text file src/cuelang.org/go/cue/testdata/eval/errunifiy.txtar

Documentation: cuelang.org/go/cue/testdata/eval

     1Incomplete errors should not unify with values.
     2
     3-- in.cue --
     4a: or([])
     5a: "t"
     6
     7b: _|_
     8b: "t"
     9-- out/eval/stats --
    10Leaks:  5
    11Freed:  3
    12Reused: 1
    13Allocs: 7
    14Retain: 5
    15
    16Unifications: 8
    17Conjuncts:    14
    18Disjuncts:    8
    19-- out/eval --
    20Errors:
    21explicit error (_|_ literal) in source:
    22    ./in.cue:4:4
    23
    24Result:
    25(_|_){
    26  // [user]
    27  a: (_|_){
    28    // [incomplete] empty list in call to or:
    29    //     ./in.cue:1:4
    30  }
    31  b: (_|_){
    32    // [user] explicit error (_|_ literal) in source:
    33    //     ./in.cue:4:4
    34  }
    35}
    36-- out/compile --
    37--- in.cue
    38{
    39  a: or([])
    40  a: "t"
    41  b: _|_(explicit error (_|_ literal) in source)
    42  b: "t"
    43}

View as plain text