Skip to content
Snippets Groups Projects
Commit c9a568db authored by Mick Jordan's avatar Mick Jordan
Browse files

partial implementation of as.character(list)

parent da68bebc
Branches
No related tags found
No related merge requests found
......@@ -130,7 +130,12 @@ public abstract class AsCharacter extends RBuiltinNode {
@SuppressWarnings("unused")
protected RStringVector doList(VirtualFrame frame, RList list) {
controlVisibility();
throw new UnsupportedOperationException("list type not supported for as.character - requires deparsing");
// partial implementation for simple special case
if (list.getLength() == 1 && list.getDataAt(0) instanceof RStringVector && ((RStringVector) list.getDataAt(0)).getLength() == 1) {
return (RStringVector) ((RStringVector) list.getDataAt(0)).copyDropAttributes();
} else {
throw RInternalError.unimplemented("list type not supported for as.character - requires deparsing");
}
}
@Specialization(guards = "!isObject(frame, container)")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment