cuelang.org/go@v0.13.0/cue/testdata/resolve/035_excluded_embedding_from_closing.txtar (about)

     1  #name: excluded embedding from closing
     2  #evalPartial
     3  -- in.cue --
     4  #S: {
     5  	a: {c: int}
     6  	{
     7  		c: {d: int}
     8  	}
     9  	let B = {open: int}
    10  	b: B
    11  }
    12  V: #S & {
    13  	c: e:     int
    14  	b: extra: int
    15  }
    16  -- out/def --
    17  #S: {
    18  	a: {
    19  		c: int
    20  	}
    21  	c: {
    22  		d: int
    23  		...
    24  	}
    25  	b: {
    26  		open: int
    27  		...
    28  	}
    29  }
    30  V: #S & {
    31  	c: {
    32  		e: int
    33  	}
    34  	b: {
    35  		extra: int
    36  	}
    37  }
    38  -- out/legacy-debug --
    39  <0>{#S: <1>C{a: <2>C{c: int}, c: <3>{d: int}, b: <4>{open: int}}, V: <5>C{a: <6>C{c: int}, c: <7>{d: int, e: int}, b: <8>{open: int, extra: int}}}
    40  -- out/compile --
    41  --- in.cue
    42  {
    43    #S: {
    44      a: {
    45        c: int
    46      }
    47      {
    48        c: {
    49          d: int
    50        }
    51      }
    52      let B#1 = {
    53        open: int
    54      }
    55      b: 〈0;let B#1〉
    56    }
    57    V: (〈0;#S〉 & {
    58      c: {
    59        e: int
    60      }
    61      b: {
    62        extra: int
    63      }
    64    })
    65  }
    66  -- out/eval/stats --
    67  Leaks:  0
    68  Freed:  21
    69  Reused: 17
    70  Allocs: 4
    71  Retain: 0
    72  
    73  Unifications: 21
    74  Conjuncts:    29
    75  Disjuncts:    21
    76  -- out/evalalpha --
    77  Errors:
    78  V.b.extra: field not allowed:
    79      ./in.cue:11:5
    80  V.c.e: field not allowed:
    81      ./in.cue:10:5
    82  
    83  Result:
    84  (_|_){
    85    // [eval]
    86    #S: (#struct){
    87      a: (#struct){
    88        c: (int){ int }
    89      }
    90      c: (#struct){
    91        d: (int){ int }
    92      }
    93      let B#1 = (#struct){
    94        open: (int){ int }
    95      }
    96      b: (#struct){
    97        open: (int){ int }
    98      }
    99    }
   100    V: (_|_){
   101      // [eval]
   102      c: (_|_){
   103        // [eval]
   104        e: (_|_){
   105          // [eval] V.c.e: field not allowed:
   106          //     ./in.cue:10:5
   107        }
   108        d: (int){ int }
   109      }
   110      b: (_|_){
   111        // [eval]
   112        extra: (_|_){
   113          // [eval] V.b.extra: field not allowed:
   114          //     ./in.cue:11:5
   115        }
   116        open: (int){ int }
   117      }
   118      a: (#struct){
   119        c: (int){ int }
   120      }
   121      let B#1 = (#struct){
   122        open: (int){ int }
   123      }
   124    }
   125  }
   126  -- diff/-out/evalalpha<==>+out/eval --
   127  diff old new
   128  --- old
   129  +++ new
   130  @@ -1,13 +1,7 @@
   131   Errors:
   132   V.b.extra: field not allowed:
   133  -    ./in.cue:6:10
   134  -    ./in.cue:7:5
   135  -    ./in.cue:9:4
   136       ./in.cue:11:5
   137   V.c.e: field not allowed:
   138  -    ./in.cue:3:2
   139  -    ./in.cue:4:6
   140  -    ./in.cue:9:4
   141       ./in.cue:10:5
   142   
   143   Result:
   144  @@ -29,33 +23,27 @@
   145     }
   146     V: (_|_){
   147       // [eval]
   148  -    a: (#struct){
   149  -      c: (int){ int }
   150  -    }
   151       c: (_|_){
   152         // [eval]
   153  -      d: (int){ int }
   154         e: (_|_){
   155           // [eval] V.c.e: field not allowed:
   156  -        //     ./in.cue:3:2
   157  -        //     ./in.cue:4:6
   158  -        //     ./in.cue:9:4
   159           //     ./in.cue:10:5
   160         }
   161  -    }
   162  -    let B#1 = (#struct){
   163  -      open: (int){ int }
   164  +      d: (int){ int }
   165       }
   166       b: (_|_){
   167         // [eval]
   168  -      open: (int){ int }
   169         extra: (_|_){
   170           // [eval] V.b.extra: field not allowed:
   171  -        //     ./in.cue:6:10
   172  -        //     ./in.cue:7:5
   173  -        //     ./in.cue:9:4
   174           //     ./in.cue:11:5
   175         }
   176  +      open: (int){ int }
   177  +    }
   178  +    a: (#struct){
   179  +      c: (int){ int }
   180  +    }
   181  +    let B#1 = (#struct){
   182  +      open: (int){ int }
   183       }
   184     }
   185   }
   186  -- diff/todo/p2 --
   187  Positions.
   188  Reordering.
   189  -- out/eval --
   190  Errors:
   191  V.b.extra: field not allowed:
   192      ./in.cue:6:10
   193      ./in.cue:7:5
   194      ./in.cue:9:4
   195      ./in.cue:11:5
   196  V.c.e: field not allowed:
   197      ./in.cue:3:2
   198      ./in.cue:4:6
   199      ./in.cue:9:4
   200      ./in.cue:10:5
   201  
   202  Result:
   203  (_|_){
   204    // [eval]
   205    #S: (#struct){
   206      a: (#struct){
   207        c: (int){ int }
   208      }
   209      c: (#struct){
   210        d: (int){ int }
   211      }
   212      let B#1 = (#struct){
   213        open: (int){ int }
   214      }
   215      b: (#struct){
   216        open: (int){ int }
   217      }
   218    }
   219    V: (_|_){
   220      // [eval]
   221      a: (#struct){
   222        c: (int){ int }
   223      }
   224      c: (_|_){
   225        // [eval]
   226        d: (int){ int }
   227        e: (_|_){
   228          // [eval] V.c.e: field not allowed:
   229          //     ./in.cue:3:2
   230          //     ./in.cue:4:6
   231          //     ./in.cue:9:4
   232          //     ./in.cue:10:5
   233        }
   234      }
   235      let B#1 = (#struct){
   236        open: (int){ int }
   237      }
   238      b: (_|_){
   239        // [eval]
   240        open: (int){ int }
   241        extra: (_|_){
   242          // [eval] V.b.extra: field not allowed:
   243          //     ./in.cue:6:10
   244          //     ./in.cue:7:5
   245          //     ./in.cue:9:4
   246          //     ./in.cue:11:5
   247        }
   248      }
   249    }
   250  }