cuelang.org/go@v0.10.1/cue/testdata/fulleval/043_optional_expanded_before_lookup.txtar (about)

     1  # DO NOT EDIT; generated by go run testdata/gen.go
     2  #
     3  #name: optional expanded before lookup
     4  #evalFull
     5  -- in.cue --
     6  test: [ID=_]: {
     7  	name: ID
     8  }
     9  
    10  test: A: {
    11  	field1: "1"
    12  	field2: "2"
    13  }
    14  
    15  B: test.A & {}
    16  -- out/def --
    17  test: {
    18  	{[ID=string]: {
    19  		name: ID
    20  	}}
    21  	A: {
    22  		name:   "A"
    23  		field1: "1"
    24  		field2: "2"
    25  	}
    26  }
    27  B: test.A & {}
    28  -- out/export --
    29  test: {
    30  	A: {
    31  		name:   "A"
    32  		field1: "1"
    33  		field2: "2"
    34  	}
    35  }
    36  B: {
    37  	name:   "A"
    38  	field1: "1"
    39  	field2: "2"
    40  }
    41  -- out/yaml --
    42  test:
    43    A:
    44      name: A
    45      field1: "1"
    46      field2: "2"
    47  B:
    48    name: A
    49    field1: "1"
    50    field2: "2"
    51  -- out/json --
    52  {"test":{"A":{"name":"A","field1":"1","field2":"2"}},"B":{"name":"A","field1":"1","field2":"2"}}
    53  -- out/legacy-debug --
    54  <0>{test: <1>{[]: <2>(ID: string)-><3>{name: <2>.ID}, A: <4>{name: "A", field1: "1", field2: "2"}}, B: <5>{name: "A", field1: "1", field2: "2"}}
    55  -- out/compile --
    56  --- in.cue
    57  {
    58    test: {
    59      [_]: {
    60        name: 〈1;-〉
    61      }
    62    }
    63    test: {
    64      A: {
    65        field1: "1"
    66        field2: "2"
    67      }
    68    }
    69    B: (〈0;test〉.A & {})
    70  }
    71  -- out/eval/stats --
    72  Leaks:  0
    73  Freed:  10
    74  Reused: 6
    75  Allocs: 4
    76  Retain: 0
    77  
    78  Unifications: 10
    79  Conjuncts:    15
    80  Disjuncts:    10
    81  -- out/eval --
    82  (struct){
    83    test: (struct){
    84      A: (struct){
    85        field1: (string){ "1" }
    86        field2: (string){ "2" }
    87        name: (string){ "A" }
    88      }
    89    }
    90    B: (struct){
    91      field1: (string){ "1" }
    92      field2: (string){ "2" }
    93      name: (string){ "A" }
    94    }
    95  }