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

Defining a function named "arguments" should set DEFINES_ARGUMENTS in its parent, not itself

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 8
    • None
    • core-libs
    • None
    • b89
    • Verified

    Description

      function x() {
        arguments("a", "b", "c");
        
        function arguments(x, y, z) {
            print(arguments)
        }
      }
      x()

      This is expected to print "[object Arguments]" - a function doesn't define its own name as a symbol in its own environment record (ES 5.1, section 10.5), therefore "arguments" in function "arguments" has to refer to the "arguments" object.

      Attachments

        Activity

          People

            attila Attila Szegedi
            attila Attila Szegedi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: