return (expr != null);
}
+ bool pure_and_in_assert () {
+ return is_pure () && in_assert ();
+ }
+
public override bool check (SemanticAnalyzer analyzer) {
if (checked) {
return !error;
// reachability analysis and error handling should never be
// necessary for assertion expressions, so it is ok to avoid
// the split
- if (analyzer.current_symbol is Block && !in_assert ()
+ if (analyzer.current_symbol is Block && !pure_and_in_assert ()
&& (operator == BinaryOperator.AND || operator == BinaryOperator.OR)) {
// convert conditional expression into if statement
// required for flow analysis and exception handling