Similarly to #1253 , the Extract2_2D is also broken for VECSXP:
forceosr <- rir.compile(function(x) x)
fail <- function(x) {
x <- strsplit(x, "[[:space:]]*=[[:space:]]*")
x <- as.matrix(x)
x <- forceosr(x)
x[[1L,1L]]
}
test <- rir.compile(function() {
fail("a")
rir.markFunction(forceosr, Reopt = TRUE)
fail("a")
})
# For a scalar generic vector (i.e., a list), our Extract2_1D returned
# the list itself and not its first element (that only works for normal vectors)
stopifnot(is.character(test()))
Similarly to #1253 , the
Extract2_2D
is also broken for VECSXP: