There was an error while loading. Please reload this page.
1 parent f70b038 commit 54e8ff1Copy full SHA for 54e8ff1
1 file changed
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/Expr.java
@@ -462,6 +462,8 @@ public Expr and(Expr expr) {
462
if (type.isLogical() && !expr.type.isLogical()) {
463
if (type == AND)
464
right.and(expr);
465
+ else if (type != NOT)
466
+ setLogical(Type.AND, expr, new Expr(this));
467
else
468
setLogical(Type.AND, expr, new Expr(this));
469
} else {
@@ -488,8 +490,10 @@ public Expr or(Expr expr) {
488
490
489
491
if (type == OR)
492
right.or(expr);
- else
493
494
setLogical(Type.OR, expr, new Expr(this));
495
+ else
496
+ setLogical(Type.OR, new Expr(this), expr);
497
}
498
499
setLogical(Type.OR, new Expr(this), expr);
0 commit comments