diff options
| author | Vexu <git@vexu.eu> | 2019-12-15 00:05:13 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-12-15 19:28:53 -0500 |
| commit | 0f38410ea6f60ce9cebf373069d4abfcac0e77e6 (patch) | |
| tree | a57673939888845bd3eb1553da5d6a23342e0e7f /src/analyze.cpp | |
| parent | 59de23dfa010c5556f79fbb8b4c637c8d150fd88 (diff) | |
| download | zig-0f38410ea6f60ce9cebf373069d4abfcac0e77e6.tar.gz zig-0f38410ea6f60ce9cebf373069d4abfcac0e77e6.zip | |
improve extern enum
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 2 |
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(); |
