...

Text file src/cuelang.org/go/cue/testdata/definitions/038_continue_recursive_closing_for_optionals.txtar

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

     1# DO NOT EDIT; generated by go run testdata/gen.go
     2#
     3#name: continue recursive closing for optionals
     4#evalFull
     5-- in.cue --
     6#S: {
     7	[string]: {a: int}
     8}
     9a: #S & {
    10	v: {b: int}
    11}
    12-- out/def --
    13#S: {
    14	[string]: {
    15		a: int
    16	}
    17}
    18a: #S & {
    19	v: {
    20		b: int
    21	}
    22}
    23-- out/legacy-debug --
    24<0>{#S: <1>{[]: <2>(_: string)-><3>C{a: int}, }, a: <4>{[]: <5>(_: string)-><6>C{a: int}, v: _|_(int:field "b" not allowed in closed struct)}}
    25-- out/compile --
    26--- in.cue
    27{
    28  #S: {
    29    [string]: {
    30      a: int
    31    }
    32  }
    33  a: (〈0;#S〉 & {
    34    v: {
    35      b: int
    36    }
    37  })
    38}
    39-- out/eval/stats --
    40Leaks:  0
    41Freed:  6
    42Reused: 2
    43Allocs: 4
    44Retain: 0
    45
    46Unifications: 6
    47Conjuncts:    9
    48Disjuncts:    6
    49-- out/evalalpha --
    50Errors:
    51a.v.b: field not allowed:
    52    ./in.cue:5:6
    53
    54Result:
    55(_|_){
    56  // [eval]
    57  #S: (#struct){
    58  }
    59  a: (_|_){
    60    // [eval]
    61    v: (_|_){
    62      // [eval]
    63      b: (_|_){
    64        // [eval] a.v.b: field not allowed:
    65        //     ./in.cue:5:6
    66      }
    67      a: (int){ int }
    68    }
    69  }
    70}
    71-- diff/-out/evalalpha<==>+out/eval --
    72diff old new
    73--- old
    74+++ new
    75@@ -1,7 +1,5 @@
    76 Errors:
    77 a.v.b: field not allowed:
    78-    ./in.cue:2:12
    79-    ./in.cue:4:4
    80     ./in.cue:5:6
    81 
    82 Result:
    83@@ -15,8 +13,6 @@
    84       // [eval]
    85       b: (_|_){
    86         // [eval] a.v.b: field not allowed:
    87-        //     ./in.cue:2:12
    88-        //     ./in.cue:4:4
    89         //     ./in.cue:5:6
    90       }
    91       a: (int){ int }
    92-- diff/todo/p2 --
    93Missing positions.
    94-- out/eval --
    95Errors:
    96a.v.b: field not allowed:
    97    ./in.cue:2:12
    98    ./in.cue:4:4
    99    ./in.cue:5:6
   100
   101Result:
   102(_|_){
   103  // [eval]
   104  #S: (#struct){
   105  }
   106  a: (_|_){
   107    // [eval]
   108    v: (_|_){
   109      // [eval]
   110      b: (_|_){
   111        // [eval] a.v.b: field not allowed:
   112        //     ./in.cue:2:12
   113        //     ./in.cue:4:4
   114        //     ./in.cue:5:6
   115      }
   116      a: (int){ int }
   117    }
   118  }
   119}

View as plain text