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

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