Skip to content

Commit

Permalink
integers/doubles: fix which types are expected
Browse files Browse the repository at this point in the history
when throwing type_error
  • Loading branch information
alyst authored and jimhester committed Aug 17, 2021
1 parent d32349b commit 4222cec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion inst/include/cpp11/doubles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ inline doubles as_doubles(sexp x) {
return ret;
}

throw type_error(INTSXP, TYPEOF(x));
throw type_error(REALSXP, TYPEOF(x));
}

template <>
Expand Down
2 changes: 1 addition & 1 deletion inst/include/cpp11/integers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ inline integers as_integers(sexp x) {
return ret;
}

throw type_error(REALSXP, TYPEOF(x));
throw type_error(INTSXP, TYPEOF(x));
}

} // namespace cpp11

0 comments on commit 4222cec

Please sign in to comment.