diff -r 9e799e96c1ec -r 90d910ec15a3 nashorn/test/script/basic/NASHORN-397.js --- a/nashorn/test/script/basic/NASHORN-397.js Fri Aug 23 12:44:01 2013 +0200 +++ b/nashorn/test/script/basic/NASHORN-397.js Fri Aug 23 13:10:45 2013 +0200 @@ -35,7 +35,10 @@ fail("typeof(5).x is not 'number'"); } -if (typeof (java.lang.System.out) != 'object') { +// It is function because PrintStream implements Closeable, which is +// marked with @FunctionalInterface. Yes, this means calling a stream +// like "stream()" closes it. +if (typeof (java.lang.System.out) != 'function') { fail("typeof java.lang.System.out is not 'object'"); }