...

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

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

     1-- in.cue --
     2a: 1
     3b: a + 1
     4d: {
     5	x: _
     6	y: b + x
     7}
     8e: d & {
     9	x: 5
    10}
    11f: {
    12	a: "foo-bar": 3
    13	b: a."foo-bar"
    14}
    15g: {
    16	a: "foo-bar": c: 3
    17	b: a."foo-bar".c
    18}
    19-- out/eval/stats --
    20Leaks:  0
    21Freed:  18
    22Reused: 13
    23Allocs: 5
    24Retain: 0
    25
    26Unifications: 18
    27Conjuncts:    27
    28Disjuncts:    18
    29-- out/evalalpha --
    30(struct){
    31  a: (int){ 1 }
    32  b: (int){ 2 }
    33  d: (struct){
    34    x: (_){ _ }
    35    y: (_|_){
    36      // [incomplete] d.y: non-concrete value _ in operand to +:
    37      //     ./in.cue:5:5
    38    }
    39  }
    40  e: (struct){
    41    x: (int){ 5 }
    42    y: (int){ 7 }
    43  }
    44  f: (struct){
    45    a: (struct){
    46      "foo-bar": (int){ 3 }
    47    }
    48    b: (int){ 3 }
    49  }
    50  g: (struct){
    51    a: (struct){
    52      "foo-bar": (struct){
    53        c: (int){ 3 }
    54      }
    55    }
    56    b: (int){ 3 }
    57  }
    58}
    59-- diff/-out/evalalpha<==>+out/eval --
    60diff old new
    61--- old
    62+++ new
    63@@ -6,7 +6,6 @@
    64     y: (_|_){
    65       // [incomplete] d.y: non-concrete value _ in operand to +:
    66       //     ./in.cue:5:5
    67-      //     ./in.cue:4:5
    68     }
    69   }
    70   e: (struct){
    71-- diff/todo/p2 --
    72Missing error positions.
    73-- out/eval --
    74(struct){
    75  a: (int){ 1 }
    76  b: (int){ 2 }
    77  d: (struct){
    78    x: (_){ _ }
    79    y: (_|_){
    80      // [incomplete] d.y: non-concrete value _ in operand to +:
    81      //     ./in.cue:5:5
    82      //     ./in.cue:4:5
    83    }
    84  }
    85  e: (struct){
    86    x: (int){ 5 }
    87    y: (int){ 7 }
    88  }
    89  f: (struct){
    90    a: (struct){
    91      "foo-bar": (int){ 3 }
    92    }
    93    b: (int){ 3 }
    94  }
    95  g: (struct){
    96    a: (struct){
    97      "foo-bar": (struct){
    98        c: (int){ 3 }
    99      }
   100    }
   101    b: (int){ 3 }
   102  }
   103}
   104-- out/compile --
   105--- in.cue
   106{
   107  a: 1
   108  b: (〈0;a〉 + 1)
   109  d: {
   110    x: _
   111    y: (〈1;b〉 + 〈0;x〉)
   112  }
   113  e: (〈0;d〉 & {
   114    x: 5
   115  })
   116  f: {
   117    a: {
   118      "foo-bar": 3
   119    }
   120    b: 〈0;a〉."foo-bar"
   121  }
   122  g: {
   123    a: {
   124      "foo-bar": {
   125        c: 3
   126      }
   127    }
   128    b: 〈0;a〉."foo-bar".c
   129  }
   130}

View as plain text