aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2019-05-09 13:18:57 +0100
committergingerBill <bill@gingerbill.org>2019-05-09 13:18:57 +0100
commit16f3bc2c0bae9ae3c5f293f49f27d2f9bc2854b5 (patch)
tree668d749886043c9231de9c2e7694dd7153feb6b2 /src/check_expr.cpp
parent71a733e3b5bda4e8baafac35c7140e0b3a0d9445 (diff)
Allow comparisons with bit field values
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index d81760211..a7e4a21e2 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -535,6 +535,11 @@ i64 check_distance_between_types(CheckerContext *c, Operand *operand, Type *type
return 1;
}
+ if (is_type_bit_field_value(operand->type) && is_type_bit_field_value(type)) {
+ return 1;
+ }
+
+
{
isize subtype_level = check_is_assignable_to_using_subtype(operand->type, type);