Skip to content

Commit

Permalink
also check missing(e2) in fallback.
Browse files Browse the repository at this point in the history
  • Loading branch information
t-kalinowski committed Nov 6, 2024
1 parent 7a995ea commit 0ad14b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/method-ops.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Ops.S7_object <- function(e1, e2) {
S7_error_method_not_found = function(cnd) cnd
)

if (S7_inherits(e1) && S7_inherits(e2)) {
if (S7_inherits(e1) && (missing(e2) || S7_inherits(e2))) {
stop(cnd)
} else {
# Must call NextMethod() directly in the method, not wrapped in an
Expand Down

0 comments on commit 0ad14b6

Please sign in to comment.