...

Text file src/cuelang.org/go/cue/testdata/comprehensions/045_comprehension_and_skipped_field.txtar

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

     1# DO NOT EDIT; generated by go run testdata/gen.go
     2#
     3#name: comprehension and skipped field
     4#bug: true
     5#evalFull
     6-- in.cue --
     7
     8for key, value in {x: v: 1} {
     9	"\(key)": {
    10		v:  *{for pod, _ in value.v {}} | {"\(value.v)": 2}
    11		_p: 3
    12	}
    13}
    14-- out/def --
    15x: {
    16	v: {
    17		"1": 2
    18	}
    19	_p: 3
    20}
    21-- out/export --
    22x: {
    23	v: {
    24		"1": 2
    25	}
    26}
    27-- out/yaml --
    28x:
    29  v:
    30    "1": 2
    31-- out/json --
    32-- out/legacy-debug --
    33<0>{x: <1>{v: <2>{"1": 2}, _p: 3}}
    34-- out/compile --
    35--- in.cue
    36{
    37  for key, value in {
    38    x: {
    39      v: 1
    40    }
    41  } {
    42    "\(〈1;key〉)": {
    43      v: (*{
    44        for pod, _ in 〈3;value〉.v {}
    45      }|{
    46        "\(〈3;value〉.v)": 2
    47      })
    48      _p: 3
    49    }
    50  }
    51}
    52-- out/eval/stats --
    53Leaks:  3
    54Freed:  7
    55Reused: 2
    56Allocs: 8
    57Retain: 7
    58
    59Unifications: 8
    60Conjuncts:    11
    61Disjuncts:    12
    62-- out/eval --
    63(struct){
    64  x: (struct){
    65    v: (struct){
    66      "1": (int){ 2 }
    67    }
    68    _p: (int){ 3 }
    69  }
    70}

View as plain text