aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
diff options
context:
space:
mode:
authorVexu <git@vexu.eu>2019-12-15 00:05:13 +0200
committerAndrew Kelley <andrew@ziglang.org>2019-12-15 19:28:53 -0500
commit0f38410ea6f60ce9cebf373069d4abfcac0e77e6 (patch)
treea57673939888845bd3eb1553da5d6a23342e0e7f /src/analyze.cpp
parent59de23dfa010c5556f79fbb8b4c637c8d150fd88 (diff)
downloadzig-0f38410ea6f60ce9cebf373069d4abfcac0e77e6.tar.gz
zig-0f38410ea6f60ce9cebf373069d4abfcac0e77e6.zip
improve extern enum
Diffstat (limited to 'src/analyze.cpp')
-rw-r--r--src/analyze.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp
index eb32e10148..cfb1b82ef9 100644
--- a/src/analyze.cpp
+++ b/src/analyze.cpp
@@ -2682,7 +2682,7 @@ static Error resolve_enum_zero_bits(CodeGen *g, ZigType *enum_type) {
// Make sure the value is unique
auto entry = occupied_tag_values.put_unique(type_enum_field->value, field_node);
- if (entry != nullptr) {
+ if (entry != nullptr && enum_type->data.enumeration.layout != ContainerLayoutExtern) {
enum_type->data.enumeration.resolve_status = ResolveStatusInvalid;
Buf *val_buf = buf_alloc();