...

Text file src/cuelang.org/go/cue/testdata/interpolation/incomplete.txtar

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

     1Issue #553
     2
     3-- in.cue --
     4a: "foo"
     5b: "boo"
     6commands: {
     7	#c: {
     8		help: "help!"
     9	}
    10}
    11out: """
    12    a is \(a)
    13    b is \(b)
    14
    15    c is \(commands.#c.help)
    16    d is \(commands.#d.help)
    17    """
    18-- out/eval/stats --
    19Leaks:  0
    20Freed:  7
    21Reused: 3
    22Allocs: 4
    23Retain: 0
    24
    25Unifications: 7
    26Conjuncts:    11
    27Disjuncts:    7
    28-- out/eval --
    29(struct){
    30  a: (string){ "foo" }
    31  b: (string){ "boo" }
    32  commands: (struct){
    33    #c: (#struct){
    34      help: (string){ "help!" }
    35    }
    36  }
    37  out: (_|_){
    38    // [incomplete] out: invalid interpolation: undefined field: #d:
    39    //     ./in.cue:8:6
    40    //     ./in.cue:13:21
    41  }
    42}
    43-- out/compile --
    44--- in.cue
    45{
    46  a: "foo"
    47  b: "boo"
    48  commands: {
    49    #c: {
    50      help: "help!"
    51    }
    52  }
    53  out: "a is \(〈0;a〉)
    54  b is \(〈0;b〉)
    55  
    56  c is \(〈0;commands〉.#c.help)
    57  d is \(〈0;commands〉.#d.help)"
    58}

View as plain text