cuelang.org/go@v0.13.0/cue/testdata/cycle/issue3570.txtar (about)

     1  // This code caused a panic on evalv2.
     2  #skip-v2
     3  -- in.cue --
     4  foo: foo: 25 | 44
     5  foo
     6  foo: foo
     7  -- out/compile --
     8  --- in.cue
     9  {
    10    foo: {
    11      foo: (25|44)
    12    }
    13    〈0;foo〉
    14    foo: 〈0;foo〉
    15  }
    16  -- out/evalalpha --
    17  Errors:
    18  2 errors in empty disjunction:
    19  conflicting values 25 and {foo:(25|44)} (mismatched types int and struct):
    20      ./in.cue:1:6
    21      ./in.cue:1:11
    22  conflicting values 44 and {foo:(25|44)} (mismatched types int and struct):
    23      ./in.cue:1:6
    24      ./in.cue:1:16
    25  
    26  Result:
    27  (_|_){
    28    // [eval] 2 errors in empty disjunction:
    29    // conflicting values 25 and {foo:(25|44)} (mismatched types int and struct):
    30    //     ./in.cue:1:6
    31    //     ./in.cue:1:11
    32    // conflicting values 44 and {foo:(25|44)} (mismatched types int and struct):
    33    //     ./in.cue:1:6
    34    //     ./in.cue:1:16
    35    foo: (struct){
    36      foo: (_){ _ }
    37    }
    38  }