nashorn/test/script/basic/JDK-8043232.js
changeset 25258 325380d7c38c
parent 25252 e8bfc909db53
child 26067 b32ccc3a76c9
--- a/nashorn/test/script/basic/JDK-8043232.js	Thu Jul 03 17:14:38 2014 +0200
+++ b/nashorn/test/script/basic/JDK-8043232.js	Thu Jul 03 23:03:37 2014 +0530
@@ -78,3 +78,15 @@
 
 // call constructor as normal method (without 'new')
 checkIt(function() Color());
+
+// try constructor on interface
+checkIt(function() new java.lang["Runnable()"]);
+checkIt(function() new java.lang["Runnable(int)"]);
+
+// try constructor on abstrace class
+try {
+    new java.io["InputStream()"];
+    throw new Error("should have thrown exception!");
+} catch (e) {
+    print(e);
+}