Bug report: instanceof incompatible with mozilla_compat's importClass

Tal Liron tal.liron at threecrickets.com
Wed Oct 9 11:40:24 PDT 2013


Example:

importClass(java.io.File)
x instanceof File

Will throw an exception:

nashorn:mozilla_compat.js:65:20 ReferenceError: File is not defined
     at 
jdk.nashorn.internal.scripts.Script$\=nashorn\!mozilla_compat._L47$_L51(nashorn:mozilla_compat.js:65)

However, this works:

x instanceof java.io.File



More information about the nashorn-dev mailing list