Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8075454

Anonymous functions have internal names exposed via parser API

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 9
    • 9
    • core-libs
    • b56
    • generic
    • generic
    • Verified

    Backports

      Description

        var Parser = Java.type("jdk.nashorn.api.tree.Parser");
        var parser = Parser.create();

        var ast = parser.parse("test.js", <<EOF

        function(x) {
          return x*x
        }

        EOF, print);

        print(ast.sourceElements[0].name);

        Expected output:
        null

        Output seen:
        L:2

        Attachments

          Issue Links

            Activity

              People

                sundar Sundararajan Athijegannathan
                sundar Sundararajan Athijegannathan
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: