cuelang.org/go@v0.10.1/cue/testdata/export/030.txtar (about)

     1  # DO NOT EDIT; generated by go run testdata/gen.go
     2  #
     3  raw: true
     4  eval: true
     5  -- in.cue --
     6  {
     7  	#Foo: {
     8  		sgl:  #Bar
     9  		ref:  null | #Foo
    10  		ext:  #Bar | null
    11  		ref:  null | #Foo
    12  		ref2: null | #Foo.sgl
    13  		...
    14  	}
    15  	#Foo: {
    16  		"#Foo": 2
    17  		...
    18  	}
    19  	#Bar: string
    20  }
    21  -- out/def --
    22  #Foo: {
    23  	"#Foo": 2
    24  	sgl:    #Bar
    25  	ref:    (null | #Foo) & (null | #Foo)
    26  	ext:    #Bar | null
    27  	ref2:   null | #Foo.sgl
    28  	...
    29  }
    30  #Bar: string
    31  -- out/export --
    32  
    33  -- out/yaml --
    34  {}
    35  -- out/json --
    36  {}
    37  -- out/compile --
    38  --- in.cue
    39  {
    40    {
    41      #Foo: {
    42        sgl: 〈1;#Bar〉
    43        ref: (null|〈1;#Foo〉)
    44        ext: (〈1;#Bar〉|null)
    45        ref: (null|〈1;#Foo〉)
    46        ref2: (null|〈1;#Foo〉.sgl)
    47        ...
    48      }
    49      #Foo: {
    50        "#Foo": 2
    51        ...
    52      }
    53      #Bar: string
    54    }
    55  }
    56  -- out/eval/stats --
    57  Leaks:  0
    58  Freed:  70
    59  Reused: 59
    60  Allocs: 11
    61  Retain: 1
    62  
    63  Unifications: 28
    64  Conjuncts:    131
    65  Disjuncts:    71
    66  -- out/evalalpha --
    67  (struct){
    68    #Foo: (#struct){
    69      sgl: (string){ string }
    70      ref: (null){ null }
    71      ext: ((null|string)){ |((string){ string }, (null){ null }) }
    72      ref2: ((null|string)){ |((null){ null }, (string){ string }) }
    73      "#Foo": (int){ 2 }
    74    }
    75    #Bar: (string){ string }
    76  }
    77  -- diff/-out/evalalpha<==>+out/eval --
    78  diff old new
    79  --- old
    80  +++ new
    81  @@ -1,13 +1,7 @@
    82   (struct){
    83     #Foo: (#struct){
    84       sgl: (string){ string }
    85  -    ref: ((null|struct)){ |((null){ null }, (#struct){
    86  -        sgl: (string){ string }
    87  -        ref: (null){ null }
    88  -        ext: ((null|string)){ |((string){ string }, (null){ null }) }
    89  -        ref2: ((null|string)){ |((null){ null }, (string){ string }) }
    90  -        "#Foo": (int){ 2 }
    91  -      }) }
    92  +    ref: (null){ null }
    93       ext: ((null|string)){ |((string){ string }, (null){ null }) }
    94       ref2: ((null|string)){ |((null){ null }, (string){ string }) }
    95       "#Foo": (int){ 2 }
    96  -- diff/todo/p2 --
    97  Structural cycle eliminated too soon?
    98  -- out/eval --
    99  (struct){
   100    #Foo: (#struct){
   101      sgl: (string){ string }
   102      ref: ((null|struct)){ |((null){ null }, (#struct){
   103          sgl: (string){ string }
   104          ref: (null){ null }
   105          ext: ((null|string)){ |((string){ string }, (null){ null }) }
   106          ref2: ((null|string)){ |((null){ null }, (string){ string }) }
   107          "#Foo": (int){ 2 }
   108        }) }
   109      ext: ((null|string)){ |((string){ string }, (null){ null }) }
   110      ref2: ((null|string)){ |((null){ null }, (string){ string }) }
   111      "#Foo": (int){ 2 }
   112    }
   113    #Bar: (string){ string }
   114  }