mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
parent
5e9fe84d24
commit
c647799e5e
10
test/cases/compile_errors/expected_optional_type_in_for.zig
Normal file
10
test/cases/compile_errors/expected_optional_type_in_for.zig
Normal 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'
|
||||||
Loading…
x
Reference in New Issue
Block a user