Permalink
Browse files

Make NativeCallOps.toJNAType handle type objects gracefully.

  • Loading branch information...
1 parent 8181f81 commit 81e634a59629b9ec714c4982c52e13bb5a534357 @arnsholt arnsholt committed Feb 16, 2014
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/vm/jvm/runtime/org/perl6/nqp/runtime/NativeCallOps.java
@@ -153,6 +153,8 @@ private static Class javaType(ThreadContext tc, ArgType target, SixModelObject s
public static Object toJNAType(ThreadContext tc, SixModelObject o, ArgType target, SixModelObject info) {
o = Ops.decont(o, tc);
+ if (Ops.isconcrete(o, tc) == 0) return null;
+
switch (target) {
case CHAR:
return new Byte((byte) o.get_int(tc));

0 comments on commit 81e634a

Please sign in to comment.