aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-08-27 00:11:02 +0100
committergingerBill <bill@gingerbill.org>2020-08-27 00:11:02 +0100
commitd31c63c0ae76115d1b9aa8b5d1f8bf7130e74977 (patch)
tree2a151c7a2204acbe7a5ace6ae76d54a04ec0eb8f /src
parentc783840eab1a7b1d89467e631ff26391e1023e7e (diff)
Fix #714
Diffstat (limited to 'src')
-rw-r--r--src/check_type.cpp2
-rw-r--r--src/types.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index 32309ce26..7be70c11d 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -1137,7 +1137,7 @@ void check_bit_set_type(CheckerContext *c, Type *type, Type *named_type, Ast *no
} else {
Type *elem = check_type_expr(c, bs->elem, nullptr);
- #if 1
+ #if 0
if (named_type != nullptr && named_type->kind == Type_Named &&
elem->kind == Type_Enum) {
// NOTE(bill): Anonymous enumeration
diff --git a/src/types.cpp b/src/types.cpp
index 4372bdd6a..453540252 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -877,6 +877,9 @@ Type *alloc_type_named(String name, Type *base, Entity *type_name) {
Type *t = alloc_type(Type_Named);
t->Named.name = name;
t->Named.base = base;
+ if (base != t) {
+ t->Named.base = base_type(base);
+ }
t->Named.type_name = type_name;
return t;
}