| 1 | export fn a() void { |
| 2 | _ = []anyopaque; |
| 3 | } |
| 4 | export fn b() void { |
| 5 | _ = [*]anyopaque; |
| 6 | } |
| 7 | export fn c() void { |
| 8 | _ = [*c]anyopaque; |
| 9 | } |
| 10 | |
| 11 | export fn d() void { |
| 12 | _ = @Pointer(.slice, .{}, anyopaque, null); |
| 13 | } |
| 14 | export fn e() void { |
| 15 | _ = @Pointer(.many, .{}, anyopaque, null); |
| 16 | } |
| 17 | export fn f() void { |
| 18 | _ = @Pointer(.c, .{}, anyopaque, null); |
| 19 | } |
| 20 | |
| 21 | // error |
| 22 | // |
| 23 | // :2:11: error: indexable pointer to opaque type 'anyopaque' not allowed |
| 24 | // :5:12: error: indexable pointer to opaque type 'anyopaque' not allowed |
| 25 | // :8:13: error: indexable pointer to opaque type 'anyopaque' not allowed |
| 26 | // :12:9: error: indexable pointer to opaque type 'anyopaque' not allowed |
| 27 | // :15:9: error: indexable pointer to opaque type 'anyopaque' not allowed |
| 28 | // :18:9: error: indexable pointer to opaque type 'anyopaque' not allowed |