From 0f499bed3d98090096acdd940e7bfb75a1efeee5 Mon Sep 17 00:00:00 2001 From: stepan <stepan.sindelar@oracle.com> Date: Mon, 10 Jul 2017 14:22:45 +0200 Subject: [PATCH] Fix bad cast in GetDimNamesAttributeNode#getDimNames --- .../truffle/r/nodes/attributes/SpecialAttributesFunctions.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SpecialAttributesFunctions.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SpecialAttributesFunctions.java index 53b01a29ef..77cb4bb1ea 100644 --- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SpecialAttributesFunctions.java +++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SpecialAttributesFunctions.java @@ -838,7 +838,8 @@ public final class SpecialAttributesFunctions { } public final RList getDimNames(Object x) { - return (RList) execute(x); + Object result = execute(x); + return result == RNull.instance ? null : (RList) result; } @Specialization(insertBefore = "getAttrFromAttributable") -- GitLab