authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-05-02 20:34:53-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-05-02 22:14:17-07:00
log48d2f226cbba4f06806382fcc097b30a8d60387f
tree71b4b329c69ca207f873a3b387d9ebb0d339ed28
parent65389dc280b97365605bc3f7f4038c1972534b9a

Sema: allow exporting optionals and pointers


1 files changed, 1 insertions(+), 1 deletions(-)

src/Sema.zig+1-1
...@@ -4323,7 +4323,7 @@ pub fn analyzeExport(...@@ -4323,7 +4323,7 @@ pub fn analyzeExport(
4323 const exported_decl = mod.declPtr(exported_decl_index);4323 const exported_decl = mod.declPtr(exported_decl_index);
4324 // TODO run the same checks as we do for C ABI struct fields4324 // TODO run the same checks as we do for C ABI struct fields
4325 switch (exported_decl.ty.zigTypeTag()) {4325 switch (exported_decl.ty.zigTypeTag()) {
4326 .Fn, .Int, .Enum, .Struct, .Union, .Array, .Float => {},4326 .Fn, .Int, .Enum, .Struct, .Union, .Array, .Float, .Pointer, .Optional => {},
4327 else => return sema.fail(block, src, "unable to export type '{}'", .{4327 else => return sema.fail(block, src, "unable to export type '{}'", .{
4328 exported_decl.ty.fmt(sema.mod),4328 exported_decl.ty.fmt(sema.mod),
4329 }),4329 }),