File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -462,6 +462,8 @@ public Expr and(Expr expr) {
462462 if (type .isLogical () && !expr .type .isLogical ()) {
463463 if (type == AND )
464464 right .and (expr );
465+ else if (type != NOT )
466+ setLogical (Type .AND , expr , new Expr (this ));
465467 else
466468 setLogical (Type .AND , expr , new Expr (this ));
467469 } else {
@@ -488,8 +490,10 @@ public Expr or(Expr expr) {
488490 if (type .isLogical () && !expr .type .isLogical ()) {
489491 if (type == OR )
490492 right .or (expr );
491- else
493+ else if ( type != NOT )
492494 setLogical (Type .OR , expr , new Expr (this ));
495+ else
496+ setLogical (Type .OR , new Expr (this ), expr );
493497 }
494498 else
495499 setLogical (Type .OR , new Expr (this ), expr );
You can’t perform that action at this time.
0 commit comments