aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/analyze.cpp')
-rw-r--r--src/analyze.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp
index f46abe5e52..5a3551a7c2 100644
--- a/src/analyze.cpp
+++ b/src/analyze.cpp
@@ -1606,6 +1606,10 @@ Error type_allowed_in_extern(CodeGen *g, ZigType *type_entry, bool *result) {
*result = false;
return ErrorNone;
}
+ if (!type_is_nonnull_ptr(child_type)) {
+ *result = false;
+ return ErrorNone;
+ }
return type_allowed_in_extern(g, child_type, result);
}
case ZigTypeIdEnum: