Skip to content

Commit 69355ca

Browse files
committed
Simplify logic
1 parent a2fcfbe commit 69355ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/expect-inheritance.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ expect_s4_class <- function(object, class) {
141141
exp_lab <- format_class(class)
142142

143143
if (identical(class, NA)) {
144-
if (!(isS4(object) == !is.na(class))) {
144+
if (isS4(object)) {
145145
msg <- sprintf("%s is an S4 object", act$lab)
146146
return(fail(msg))
147147
}

0 commit comments

Comments
 (0)