Allow comparisons with bit field values

This commit is contained in:
gingerBill
2019-05-09 13:18:57 +01:00
parent 71a733e3b5
commit 16f3bc2c0b
3 changed files with 58 additions and 15 deletions

View File

@@ -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);