test cases: expected optional type in for loop

Closes #10674
This commit is contained in:
r00ster91 2023-05-28 03:12:14 +02:00
parent 5e9fe84d24
commit c647799e5e

View File

@ -0,0 +1,10 @@
export fn entry() void {
var items = [_]u8{ 1, 2, 3 };
for (&items) |*i| {
i.?.* = 1;
}
}
// error
//
// :4:10: error: expected optional type, found '*u8'