aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-09-29 21:11:16 +0100
committerGinger Bill <bill@gingerbill.org>2017-09-29 21:11:16 +0100
commit11614c2649aa28a642e4d699cf447d6938057190 (patch)
tree4a9748c2a27801dcc4f585f4eb622e1ea539813b /src/check_expr.cpp
parent793bc8c58580dfb64d7c31ca992c34b38e9847e7 (diff)
Fix old_demos; Fix `when` bug; Fix enum `.names`
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index bec444d2f..d28419ccf 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -4823,6 +4823,9 @@ Entity *check_selector(Checker *c, Operand *operand, AstNode *node, Type *type_h
if (entity != nullptr && (entity->flags&EntityFlag_TypeField)) {
add_type_info_type(c, operand->type);
}
+ if (is_type_enum(operand->type)) {
+ add_type_info_type(c, operand->type);
+ }
}
if (entity == nullptr && selector->kind == AstNode_BasicLit) {
if (is_type_struct(operand->type) || is_type_tuple(operand->type)) {