(function f(){return f; var f})() should evaluate to undefined value. While this works as expected with jdk9-dev/nashorn, the same fails with jdk8u60 ea as well as jdk8u-dev/nashorn repo. It evaluates to function "f" instead.