github.com/joomcode/cue@v0.4.4-0.20221111115225-539fe3512047/cue/testdata/lists/020_list_compilefail.txtar (about)

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