...

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

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

     1-- in.cue --
     2e: #Example
     3
     4e: a: "hello"
     5
     6#Example: {
     7	a: string
     8	{
     9		value?: string
    10	} | {
    11		externalValue?: string
    12	}
    13}
    14-- out/eval/stats --
    15Leaks:  0
    16Freed:  15
    17Reused: 9
    18Allocs: 6
    19Retain: 0
    20
    21Unifications: 11
    22Conjuncts:    21
    23Disjuncts:    15
    24-- out/eval --
    25(struct){
    26  e: (#struct){ |((#struct){
    27      a: (string){ "hello" }
    28      value?: (string){ string }
    29    }, (#struct){
    30      a: (string){ "hello" }
    31      externalValue?: (string){ string }
    32    }) }
    33  #Example: (#struct){ |((#struct){
    34      a: (string){ string }
    35      value?: (string){ string }
    36    }, (#struct){
    37      a: (string){ string }
    38      externalValue?: (string){ string }
    39    }) }
    40}
    41-- out/compile --
    42--- in.cue
    43{
    44  e: 〈0;#Example〉
    45  e: {
    46    a: "hello"
    47  }
    48  #Example: {
    49    a: string
    50    ({
    51      value?: string
    52    }|{
    53      externalValue?: string
    54    })
    55  }
    56}

View as plain text