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