...

Text file src/cuelang.org/go/cue/testdata/lists/020_list_compilefail.txtar

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

     1#name: list arithmetic
     2#evalPartial
     3-- in.cue --
     4l3: <=2 * []
     5l4: <=2 * [int]
     6l5: <=2 * (int * [int])
     7b:  <=5 * [int]
     8b: [1, 2, ...]
     9c: (>=3 & <=5) * [int]
    10c: [1, 2, ...]
    11d: >=2 * [int]
    12d: [1, 2, ...]
    13-- out/compile --
    14l3: invalid operand <=2 ('*' requires concrete value):
    15    ./in.cue:1:5
    16l4: invalid operand <=2 ('*' requires concrete value):
    17    ./in.cue:2:5
    18l5: invalid operand <=2 ('*' requires concrete value):
    19    ./in.cue:3:5
    20l5: invalid operand int ('*' requires concrete value):
    21    ./in.cue:3:12
    22b: invalid operand <=5 ('*' requires concrete value):
    23    ./in.cue:4:5
    24d: invalid operand >=2 ('*' requires concrete value):
    25    ./in.cue:8:4
    26--- in.cue
    27{
    28  l3: (<=2 * [])
    29  l4: (<=2 * [
    30    int,
    31  ])
    32  l5: (<=2 * (int * [
    33    int,
    34  ]))
    35  b: (<=5 * [
    36    int,
    37  ])
    38  b: [
    39    1,
    40    2,
    41    ...,
    42  ]
    43  c: ((>=3 & <=5) * [
    44    int,
    45  ])
    46  c: [
    47    1,
    48    2,
    49    ...,
    50  ]
    51  d: (>=2 * [
    52    int,
    53  ])
    54  d: [
    55    1,
    56    2,
    57    ...,
    58  ]
    59}
    60-- out/eval --
    61l3: invalid operand <=2 ('*' requires concrete value):
    62    ./in.cue:1:5
    63l4: invalid operand <=2 ('*' requires concrete value):
    64    ./in.cue:2:5
    65l5: invalid operand <=2 ('*' requires concrete value):
    66    ./in.cue:3:5
    67l5: invalid operand int ('*' requires concrete value):
    68    ./in.cue:3:12
    69b: invalid operand <=5 ('*' requires concrete value):
    70    ./in.cue:4:5
    71d: invalid operand >=2 ('*' requires concrete value):
    72    ./in.cue:8:4

View as plain text