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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: 8u40, 9
    • Component/s: 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.

              Assignee:
              Marcus Lagergren
              Reporter:
              Sundararajan Athijegannathan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: