| ... | @@ -19,11 +19,13 @@ comptime { | ... | @@ -19,11 +19,13 @@ comptime { |
| 19 | | 19 | |
| 20 | export fn entry1() void { | 20 | export fn entry1() void { |
| 21 | var start: usize = 0; | 21 | var start: usize = 0; |
| | 22 | _ = &start; |
| 22 | _ = ptr[start..2]; | 23 | _ = ptr[start..2]; |
| 23 | } | 24 | } |
| 24 | | 25 | |
| 25 | export fn entry2() void { | 26 | export fn entry2() void { |
| 26 | var end: usize = 0; | 27 | var end: usize = 0; |
| | 28 | _ = &end; |
| 27 | _ = ptr[0..end]; | 29 | _ = ptr[0..end]; |
| 28 | } | 30 | } |
| 29 | | 31 | |
| ... | @@ -35,7 +37,7 @@ export fn entry2() void { | ... | @@ -35,7 +37,7 @@ export fn entry2() void { |
| 35 | // :13:16: error: slice of single-item pointer must have comptime-known bounds [0..0], [0..1], or [1..1] | 37 | // :13:16: error: slice of single-item pointer must have comptime-known bounds [0..0], [0..1], or [1..1] |
| 36 | // :13:16: note: expected '1', found '2' | 38 | // :13:16: note: expected '1', found '2' |
| 37 | // :17:16: error: end index 2 out of bounds for slice of single-item pointer | 39 | // :17:16: error: end index 2 out of bounds for slice of single-item pointer |
| 38 | // :22:13: error: unable to resolve comptime value | 40 | // :23:13: error: unable to resolve comptime value |
| 39 | // :22:13: note: slice of single-item pointer must have comptime-known bounds [0..0], [0..1], or [1..1] | 41 | // :23:13: note: slice of single-item pointer must have comptime-known bounds [0..0], [0..1], or [1..1] |
| 40 | // :27:16: error: unable to resolve comptime value | 42 | // :29:16: error: unable to resolve comptime value |
| 41 | // :27:16: note: slice of single-item pointer must have comptime-known bounds [0..0], [0..1], or [1..1] | 43 | // :29:16: note: slice of single-item pointer must have comptime-known bounds [0..0], [0..1], or [1..1] |