test/script/basic/javaarrayconversion.js asserts that an array of java objects can't be convert to a primitive Java array using the line:
Java.to([new Java.type(sourceType)()], targetType + "[]"
expecting a TypeError. However the caught TypeError is actually "function type() { [native code] } is not a constructor function" because new is called on Java.type, not its result. So it should instead be:
Java.to([new (Java.type(sourceType))()], targetType + "[]");
After this change the test fails with "no TypeError encountered" what suggests a bug in Nashorn.