Skip to content

Commit ce5fcb5

Browse files
committed
assume no altrep at that point
1 parent c539c66 commit ce5fcb5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/frollapply.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ SEXP memcpyDTadaptive(SEXP dest, SEXP src, SEXP offset, SEXP size) {
7777
// needed in adaptive=TRUE
7878
SEXP setgrowable(SEXP x) {
7979
if (!isNewList(x)) {
80+
if (ALTREP(x)) internal_error(__func__, "frollapply's adaptive=T setgrowable should have not been called with an ALTREP input"); // # nocov
8081
if (!is_growable(x)) {
8182
return make_growable(x);
8283
}
@@ -86,10 +87,9 @@ SEXP setgrowable(SEXP x) {
8687
for (R_xlen_t i = 0; i < xlength(x); ++i) {
8788
//Rprintf("%d",3); // manual code coverage to confirm it is reached when marking nocov
8889
SEXP this = VECTOR_ELT(x, i);
89-
if (
90-
!is_growable(this)
91-
&& !ALTREP(this)
92-
) SET_VECTOR_ELT(x, i, make_growable(this));
90+
if (ALTREP(this)) internal_error(__func__, "frollapply's adaptive=T setgrowable should have not been called with an ALTREP input"); // # nocov
91+
if (!is_growable(this))
92+
SET_VECTOR_ELT(x, i, make_growable(this));
9393
}
9494
// # nocov end
9595
return x;

0 commit comments

Comments
 (0)