| 1 | export fn entry1(x: *anyopaque) void { |
| 2 | _ = @as([]u8, @ptrCast(x)); |
| 3 | } |
| 4 | |
| 5 | const Opaque = opaque {}; |
| 6 | export fn entry2(x: *Opaque) void { |
| 7 | _ = @as([]u8, @ptrCast(x)); |
| 8 | } |
| 9 | |
| 10 | // error |
| 11 | // |
| 12 | // :2:19: error: cannot infer length of slice of 'u8' from pointer to opaque type 'anyopaque' with unknown size |
| 13 | // :7:19: error: cannot infer length of slice of 'u8' from pointer to opaque type 'tmp.Opaque' with unknown size |
| 14 | // :5:16: note: opaque declared here |