mirror of
https://github.com/ziglang/zig.git
synced 2024-11-28 08:02:32 +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…
Reference in New Issue
Block a user