disallow unknown-length pointer to opaque
This also means that translate-c has to detect when a pointer to opaque is happening, and use `*` instead of `[*]`. See #1059
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
const tests = @import("tests.zig");
|
||||
|
||||
pub fn addCases(cases: *tests.CompileErrorContext) void {
|
||||
cases.add(
|
||||
"unknown length pointer to opaque",
|
||||
\\export const T = [*]@OpaqueType();
|
||||
,
|
||||
".tmp_source.zig:1:18: error: unknown-length pointer to opaque",
|
||||
);
|
||||
|
||||
cases.add(
|
||||
"error when evaluating return type",
|
||||
\\const Foo = struct {
|
||||
|
||||
Reference in New Issue
Block a user