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

Fix arg names in language -> pairlist conversion

parent 8effe077
No related branches found
No related tags found
No related merge requests found
......@@ -560,7 +560,9 @@ public final class RPairList extends RSharingAttributeStorage implements RAbstra
Object p = this;
for (int i = 0; i < newNames.getLength() && !isNull(p); i++) {
RPairList pList = (RPairList) p;
pList.setTag(RDataFactory.createSymbol(newNames.getDataAt(i)));
String newNameVal = newNames.getDataAt(i);
Object newTag = newNameVal.isEmpty() ? RNull.instance : RDataFactory.createSymbolInterned(newNameVal);
pList.setTag(newTag);
p = pList.cdr();
}
}
......
......@@ -30,3 +30,8 @@ l
api.SET_TYPEOF(l, 6) # LANGSXP
l
eval(l)
# language objects treated as pairlists:
b <- ~fun(arg = val, arg2)
api.TAG(api.CDR(api.CDR(api.CAR(api.CDR(b)))))
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