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

Additional arguments to Function.prototype.apply messes up actual arguments passed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 8u40, 9
    • core-libs
    • None
    • b30
    • generic
    • generic

        Script:

        function func(x, y, z) {
           print(x, y, z);
        }

        function g() {
            func.apply(this, arguments, 23);
        }

        g(3, 54, 3);

        Expected: 3 54 3
        Actual: [Ljava.lang.Object;@417213 23 undefined

        8u20 works fine. jdk8u-dev and jdk9-dev have this issue.

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

                Created:
                Updated:
                Resolved: