-- in.cue --
a:  [2][0:0]   @test(eq, [])
b:  [0][1:1]   @test(eq, [])
e1: [][1:1]    @test(err, code=eval, contains="index 1 out of range", pos=[0:5])
e2: [0][-1:0]  @test(err, code=eval, contains="cannot convert negative number", pos=[0:5])
e3: [0][1:0]   @test(err, code=eval, contains="invalid slice index", pos=[0:5])
e4: [0][1:2]   @test(err, code=eval, contains="index 2 out of range", pos=[0:5])
e5: 4[1:2]     @test(err, code=eval, contains="cannot slice 4", pos=[0:5])
e6: [2]["":] @test(err, code=eval, contains="cannot use \"\"", pos=[0:5, 0:9])
e7: [2][:"9"]  @test(err, code=eval, contains="cannot use \"9\"", pos=[0:5, 0:10])
-- out/errors.txt --
[eval] e1: index 1 out of range:
    ./in.cue:3:5
[eval] e2: cannot convert negative number to uint64:
    ./in.cue:4:5
[eval] e3: invalid slice index: 1 > 0:
    ./in.cue:5:5
[eval] e4: index 2 out of range:
    ./in.cue:6:5
[eval] e5: cannot slice 4 (type int):
    ./in.cue:7:5
[eval] e6: cannot use "" (type string) as type int in slice index:
    ./in.cue:8:5
    ./in.cue:8:9
[eval] e7: cannot use "9" (type string) as type int in slice index:
    ./in.cue:9:5
    ./in.cue:9:10
-- out/eval/stats --
Leaks:  0
Freed:  25
Reused: 13
Allocs: 12
Retain: 0

Unifications: 18
Conjuncts:    18
Disjuncts:    0
