Simplify boolean expr

This commit is contained in:
Ayaz Hafiz 2022-07-22 18:21:34 -04:00
parent b04764bdd6
commit 8f7bae3617
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -413,7 +413,8 @@ impl<'a> ExprState<'a> {
let fail = EExpr::BadOperator(opchar, loc_op.region.start());
Err(fail)
} else if !(self.expr.value.is_tag() || self.expr.value.is_opaque())
} else if !self.expr.value.is_tag()
&& !self.expr.value.is_opaque()
&& !self.arguments.is_empty()
{
let region = Region::across_all(self.arguments.iter().map(|v| &v.region));