p4raw-id: //depot/perl@27423
scalarboolean(first);
/* optimize "!a && b" to "a || b", and "!a || b" to "a && b" */
- if (first->op_type == OP_NOT && (first->op_flags & OPf_SPECIAL)) {
+ if (first->op_type == OP_NOT
+ && (first->op_flags & OPf_SPECIAL)
+ && (first->op_flags & OPf_KIDS)) {
if (type == OP_AND || type == OP_OR) {
if (type == OP_AND)
type = OP_OR;