Function.prototype.bind doesn't work

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P2
    • None
    • Affects Version/s: 8, 8u20
    • Component/s: core-libs
    • None
    • Environment:

      jdk8, b129

    • 8
    • generic
    • generic

      Run this code :
      var context = {
          b : 42
      }
      function a () {
          print(this.b)
      }
      a()
      var c = a.bind(context)
      c()

      output :
      undefined
      undefined // this is wrong, need "42"

            Assignee:
            Sundararajan Athijegannathan
            Reporter:
            Sergey Lugovoy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: