Skip to content

Commit

Permalink
drop=FALSE fixes error for alternatives with 1 subject
Browse files Browse the repository at this point in the history
  • Loading branch information
tdhock committed Aug 15, 2024
1 parent 6f539a6 commit 0bbcd3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/apply_type_funs.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ apply_type_funs <- function
if(1 < length(dup.type.tab)){
stop(domain=NA, gettextf("capture groups with identical names should have conversion functions that all return the same type; problem group name=%s has types %s", dup.name, paste(names(dup.type.tab), collapse = ",")))
}
is.match.name <- is.match[, dup.col.indices]#TODO drop=FALSE + test.
is.match.name <- is.match[, dup.col.indices, drop=FALSE]
if(any(1 < rowSums(is.match.name))){
stop(domain=NA, gettextf("duplicate capture group names are only allowed in alternatives, problem: %s", dup.name))
}
Expand Down

0 comments on commit 0bbcd3b

Please sign in to comment.