mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-05-07 17:11:19 -04:00
dec1163fbb
Co-authored-by: Matthew Lugg <mlugg@mlugg.co.uk>
29 lines
801 B
Zig
29 lines
801 B
Zig
export fn a() void {
|
|
_ = []anyopaque;
|
|
}
|
|
export fn b() void {
|
|
_ = [*]anyopaque;
|
|
}
|
|
export fn c() void {
|
|
_ = [*c]anyopaque;
|
|
}
|
|
|
|
export fn d() void {
|
|
_ = @Pointer(.slice, .{}, anyopaque, null);
|
|
}
|
|
export fn e() void {
|
|
_ = @Pointer(.many, .{}, anyopaque, null);
|
|
}
|
|
export fn f() void {
|
|
_ = @Pointer(.c, .{}, anyopaque, null);
|
|
}
|
|
|
|
// error
|
|
//
|
|
// :2:11: error: indexable pointer to opaque type 'anyopaque' not allowed
|
|
// :5:12: error: indexable pointer to opaque type 'anyopaque' not allowed
|
|
// :8:13: error: indexable pointer to opaque type 'anyopaque' not allowed
|
|
// :12:9: error: indexable pointer to opaque type 'anyopaque' not allowed
|
|
// :15:9: error: indexable pointer to opaque type 'anyopaque' not allowed
|
|
// :18:9: error: indexable pointer to opaque type 'anyopaque' not allowed
|