Skip to content
Snippets Groups Projects
Commit 0b94f943 authored by Tomas Stupka's avatar Tomas Stupka
Browse files

if no keys then ListMR should instead of RNull return an empty vector (responding to HAS_SIZE)

parent 20a7cf4e
No related branches found
No related tags found
No related merge requests found
......@@ -45,12 +45,12 @@ import com.oracle.truffle.r.nodes.access.vector.ReplaceVectorNode;
import com.oracle.truffle.r.nodes.attributes.SpecialAttributesFunctions.GetNamesAttributeNode;
import com.oracle.truffle.r.nodes.control.RLengthNode;
import com.oracle.truffle.r.runtime.data.NativeDataAccess;
import com.oracle.truffle.r.runtime.data.RDataFactory;
import com.oracle.truffle.r.runtime.data.RExpression;
import com.oracle.truffle.r.runtime.data.RFunction;
import com.oracle.truffle.r.runtime.data.RList;
import com.oracle.truffle.r.runtime.data.RLogical;
import com.oracle.truffle.r.runtime.data.RMissing;
import com.oracle.truffle.r.runtime.data.RNull;
import com.oracle.truffle.r.runtime.data.RPairList;
import com.oracle.truffle.r.runtime.data.RStringVector;
import com.oracle.truffle.r.runtime.data.RTruffleObject;
......@@ -533,6 +533,6 @@ public class ListMR {
private static Object listKeys(TruffleObject receiver, GetNamesAttributeNode getNamesNode) {
RStringVector names = getNamesNode.getNames(receiver);
return names != null ? names : RNull.instance;
return names != null ? names : RDataFactory.createEmptyStringVector();
}
}
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