{code}
function () { // line 1
print("hello from nashorn");
}
print(this["L:1"]); // print function on line 1
{code}
expected:
undefined
actual:
function () { // line 1
print("hello from nashorn");
}
{code:title=--print-parse}
[<unknown>] function :program() {
[|1|];
var L:1 = [<unknown>] function L:1() {
[|2|];
print("hello from nashorn");
}
[|5|];
print(this["L:1"]);
}
{code}
Note that this is a Nashorn syntax extension, and it does not happen if function is assigned to a variable.
|