test/script/trusted/JDK-8021129.js

changeset 464
a58a07a00122
parent 463
8b97fe2b7c98
child 468
dc54df348a58
     1.1 --- a/test/script/trusted/JDK-8021129.js	Tue Jul 23 18:28:58 2013 +0200
     1.2 +++ b/test/script/trusted/JDK-8021129.js	Wed Jul 24 11:13:24 2013 +0200
     1.3 @@ -29,7 +29,9 @@
     1.4   * @test
     1.5   * @run
     1.6   */
     1.7 -var r1 = new (Java.type("jdk.nashorn.internal.test.models.InternalRunnable"))
     1.8 +var R = Java.type("jdk.nashorn.internal.test.models.InternalRunnable")
     1.9 +var r1 = R.class.newInstance()
    1.10 +
    1.11  r1.run() // Can execute method from an implemented non-restricted interface
    1.12  print(r1.toString()) // Can execute public method from a superclass
    1.13  
    1.14 @@ -40,4 +42,4 @@
    1.15  print(r1.canNotSeeThisField === undefined) // Can't see its own fields
    1.16  
    1.17  var r2 = new (Java.type("jdk.nashorn.test.models.InternalRunnableSuperclass"))
    1.18 -print(r2.canSeeThisField) // Superclass field works fine on its own
    1.19 \ No newline at end of file
    1.20 +print(r2.canSeeThisField) // Superclass field works fine on its own

mercurial