cuelang.org/go@v0.10.1/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  l5: invalid operand int ('*' requires concrete value):
    21      ./in.cue:3:12
    22  b: invalid operand <=5 ('*' requires concrete value):
    23      ./in.cue:4:5
    24  d: 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 --
    61  l3: invalid operand <=2 ('*' requires concrete value):
    62      ./in.cue:1:5
    63  l4: invalid operand <=2 ('*' requires concrete value):
    64      ./in.cue:2:5
    65  l5: invalid operand <=2 ('*' requires concrete value):
    66      ./in.cue:3:5
    67  l5: invalid operand int ('*' requires concrete value):
    68      ./in.cue:3:12
    69  b: invalid operand <=5 ('*' requires concrete value):
    70      ./in.cue:4:5
    71  d: invalid operand >=2 ('*' requires concrete value):
    72      ./in.cue:8:4