Skip to content

Commit

Permalink
update test case for new const/var compile error
Browse files Browse the repository at this point in the history
commit 8afafa7 was created when this
error did not exist yet.
  • Loading branch information
andrewrk committed Jan 15, 2024
1 parent 03ed3f5 commit 32e8825
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ comptime {

export fn entry1() void {
var start: usize = 0;
_ = &start;
_ = ptr[start..2];
}

export fn entry2() void {
var end: usize = 0;
_ = &end;
_ = ptr[0..end];
}

Expand All @@ -35,7 +37,7 @@ export fn entry2() void {
// :13:16: error: slice of single-item pointer must have comptime-known bounds [0..0], [0..1], or [1..1]
// :13:16: note: expected '1', found '2'
// :17:16: error: end index 2 out of bounds for slice of single-item pointer
// :22:13: error: unable to resolve comptime value
// :22:13: note: slice of single-item pointer must have comptime-known bounds [0..0], [0..1], or [1..1]
// :27:16: error: unable to resolve comptime value
// :27:16: note: slice of single-item pointer must have comptime-known bounds [0..0], [0..1], or [1..1]
// :23:13: error: unable to resolve comptime value
// :23:13: note: slice of single-item pointer must have comptime-known bounds [0..0], [0..1], or [1..1]
// :29:16: error: unable to resolve comptime value
// :29:16: note: slice of single-item pointer must have comptime-known bounds [0..0], [0..1], or [1..1]

0 comments on commit 32e8825

Please sign in to comment.