cuelang.org/go@v0.13.0/cue/testdata/fulleval/026_dont_convert_incomplete_errors_to_non-incomplete.txtar (about)

     1  #name: dont convert incomplete errors to non-incomplete
     2  #evalFull
     3  -- in.cue --
     4  import "strings"
     5  
     6  n1: {min: <max, max: >min}
     7  n2: -num
     8  n3: +num
     9  n4: num + num
    10  n5: num - num
    11  n6: num * num
    12  n7: num / num
    13  
    14  b1: !is
    15  
    16  s1: "\(str)"
    17  s2: strings.ContainsAny("dd")
    18  s3: strings.ContainsAny(str, "dd")
    19  
    20  str: string
    21  num: <4
    22  is:  bool
    23  -- out/def --
    24  import "strings"
    25  
    26  n1: {
    27  	min: <max
    28  	max: >min
    29  }
    30  n2:  -num
    31  num: <4
    32  n3:  +num
    33  n4:  num + num
    34  n5:  num - num
    35  n6:  num * num
    36  n7:  num / num
    37  b1:  !is
    38  is:  bool
    39  s1:  "\(str)"
    40  str: string
    41  s2:  strings.ContainsAny("dd")
    42  s3:  strings.ContainsAny(str, "dd")
    43  -- out/legacy-debug --
    44  <0>{n1: <1>{min: <<2>.max, max: ><2>.min}, n2: -<3>.num, num: <4, n3: +<3>.num, n4: (<3>.num + <3>.num), n5: (<3>.num - <3>.num), n6: (<3>.num * <3>.num), n7: (<3>.num / <3>.num), b1: !<3>.is, is: bool, s1: ""+<3>.str+"", str: string, s2: strings.ContainsAny ("dd"), s3: <4>.ContainsAny (<3>.str,"dd")}
    45  -- out/evalalpha/stats --
    46  Leaks:  17
    47  Freed:  0
    48  Reused: 0
    49  Allocs: 17
    50  Retain: 0
    51  
    52  Unifications: 17
    53  Conjuncts:    17
    54  Disjuncts:    0
    55  -- diff/-out/evalalpha/stats<==>+out/eval/stats --
    56  diff old new
    57  --- old
    58  +++ new
    59  @@ -1,9 +1,9 @@
    60  -Leaks:  0
    61  -Freed:  17
    62  -Reused: 12
    63  -Allocs: 5
    64  -Retain: 75
    65  +Leaks:  17
    66  +Freed:  0
    67  +Reused: 0
    68  +Allocs: 17
    69  +Retain: 0
    70   
    71   Unifications: 17
    72  -Conjuncts:    71
    73  -Disjuncts:    82
    74  +Conjuncts:    17
    75  +Disjuncts:    0
    76  -- out/eval/stats --
    77  Leaks:  0
    78  Freed:  17
    79  Reused: 12
    80  Allocs: 5
    81  Retain: 75
    82  
    83  Unifications: 17
    84  Conjuncts:    71
    85  Disjuncts:    82
    86  -- out/evalalpha --
    87  (struct){
    88    n1: (struct){
    89      min: (_|_){
    90        // [cycle] n1.min: cycle with field: max:
    91        //     ./in.cue:3:12
    92        // n1.max: cycle with field: min:
    93        //     ./in.cue:3:23
    94      }
    95      max: (_|_){
    96        // [cycle] n1.min: cycle with field: max:
    97        //     ./in.cue:3:12
    98        // n1.max: cycle with field: min:
    99        //     ./in.cue:3:23
   100      }
   101    }
   102    n2: (_|_){
   103      // [incomplete] n2: operand num of '-' not concrete (was number):
   104      //     ./in.cue:4:6
   105    }
   106    n3: (_|_){
   107      // [incomplete] n3: operand num of '+' not concrete (was number):
   108      //     ./in.cue:5:6
   109    }
   110    n4: (_|_){
   111      // [incomplete] n4: non-concrete value <4 in operand to +:
   112      //     ./in.cue:6:5
   113      //     ./in.cue:18:6
   114    }
   115    n5: (_|_){
   116      // [incomplete] n5: non-concrete value <4 in operand to -:
   117      //     ./in.cue:7:5
   118      //     ./in.cue:18:6
   119    }
   120    n6: (_|_){
   121      // [incomplete] n6: non-concrete value <4 in operand to *:
   122      //     ./in.cue:8:5
   123      //     ./in.cue:18:6
   124    }
   125    n7: (_|_){
   126      // [incomplete] n7: non-concrete value <4 in operand to /:
   127      //     ./in.cue:9:5
   128      //     ./in.cue:18:6
   129    }
   130    b1: (_|_){
   131      // [incomplete] b1: operand is of '!' not concrete (was bool):
   132      //     ./in.cue:11:6
   133    }
   134    s1: (_|_){
   135      // [incomplete] s1: invalid interpolation: non-concrete value string (type string):
   136      //     ./in.cue:13:5
   137      //     ./in.cue:17:6
   138    }
   139    s2: (string){ strings.ContainsAny("dd") }
   140    s3: (_|_){
   141      // [incomplete] s3: error in call to strings.ContainsAny: non-concrete value string:
   142      //     ./in.cue:15:5
   143      //     ./in.cue:17:6
   144    }
   145    str: (string){ string }
   146    num: (number){ <4 }
   147    is: (bool){ bool }
   148  }
   149  -- diff/-out/evalalpha<==>+out/eval --
   150  diff old new
   151  --- old
   152  +++ new
   153  @@ -1,12 +1,16 @@
   154   (struct){
   155     n1: (struct){
   156       min: (_|_){
   157  -      // [cycle] cycle error
   158  +      // [cycle] n1.min: cycle with field: max:
   159  +      //     ./in.cue:3:12
   160  +      // n1.max: cycle with field: min:
   161  +      //     ./in.cue:3:23
   162       }
   163       max: (_|_){
   164  -      // [cycle] cycle error
   165  -      // cycle error:
   166  -      //     ./in.cue:3:22
   167  +      // [cycle] n1.min: cycle with field: max:
   168  +      //     ./in.cue:3:12
   169  +      // n1.max: cycle with field: min:
   170  +      //     ./in.cue:3:23
   171       }
   172     }
   173     n2: (_|_){
   174  -- out/eval --
   175  (struct){
   176    n1: (struct){
   177      min: (_|_){
   178        // [cycle] cycle error
   179      }
   180      max: (_|_){
   181        // [cycle] cycle error
   182        // cycle error:
   183        //     ./in.cue:3:22
   184      }
   185    }
   186    n2: (_|_){
   187      // [incomplete] n2: operand num of '-' not concrete (was number):
   188      //     ./in.cue:4:6
   189    }
   190    n3: (_|_){
   191      // [incomplete] n3: operand num of '+' not concrete (was number):
   192      //     ./in.cue:5:6
   193    }
   194    n4: (_|_){
   195      // [incomplete] n4: non-concrete value <4 in operand to +:
   196      //     ./in.cue:6:5
   197      //     ./in.cue:18:6
   198    }
   199    n5: (_|_){
   200      // [incomplete] n5: non-concrete value <4 in operand to -:
   201      //     ./in.cue:7:5
   202      //     ./in.cue:18:6
   203    }
   204    n6: (_|_){
   205      // [incomplete] n6: non-concrete value <4 in operand to *:
   206      //     ./in.cue:8:5
   207      //     ./in.cue:18:6
   208    }
   209    n7: (_|_){
   210      // [incomplete] n7: non-concrete value <4 in operand to /:
   211      //     ./in.cue:9:5
   212      //     ./in.cue:18:6
   213    }
   214    b1: (_|_){
   215      // [incomplete] b1: operand is of '!' not concrete (was bool):
   216      //     ./in.cue:11:6
   217    }
   218    s1: (_|_){
   219      // [incomplete] s1: invalid interpolation: non-concrete value string (type string):
   220      //     ./in.cue:13:5
   221      //     ./in.cue:17:6
   222    }
   223    s2: (string){ strings.ContainsAny("dd") }
   224    s3: (_|_){
   225      // [incomplete] s3: error in call to strings.ContainsAny: non-concrete value string:
   226      //     ./in.cue:15:5
   227      //     ./in.cue:17:6
   228    }
   229    str: (string){ string }
   230    num: (number){ <4 }
   231    is: (bool){ bool }
   232  }
   233  -- out/compile --
   234  --- in.cue
   235  {
   236    n1: {
   237      min: <〈0;max〉
   238      max: >〈0;min〉
   239    }
   240    n2: -〈0;num〉
   241    n3: +〈0;num〉
   242    n4: (〈0;num〉 + 〈0;num〉)
   243    n5: (〈0;num〉 - 〈0;num〉)
   244    n6: (〈0;num〉 * 〈0;num〉)
   245    n7: (〈0;num〉 / 〈0;num〉)
   246    b1: !〈0;is〉
   247    s1: "\(〈0;str〉)"
   248    s2: 〈import;strings〉.ContainsAny("dd")
   249    s3: 〈import;strings〉.ContainsAny(〈0;str〉, "dd")
   250    str: string
   251    num: <4
   252    is: bool
   253  }