Skip to content
Snippets Groups Projects
Commit be07d620 authored by stepan's avatar stepan
Browse files

Fix RFFI CAR for empty '...' returns NULL

parent ca662b77
No related branches found
No related tags found
No related merge requests found
......@@ -63,6 +63,9 @@ public final class ListAccessNodes {
@Specialization
protected Object car(RArgsValuesAndNames args) {
if (args.isEmpty()) {
return RNull.instance;
}
return args.getArgument(0);
}
......
# Some more tests that work with pairlists and related objects like '...' or language
stopifnot(require(testrffi))
# Note: GNU R returns the promise, FastR the value, we check that at least there are not exceptions
foo <- function(...) api.CAR(get('...'))
invisible(foo(a=3))
invisible(foo(a=4, b=6))
foo <- function(...) api.CDR(get('...'))
is.null(foo(a=3))
names(foo(a=4, b=6))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment