A function can't be bound twice

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 8
    • Affects Version/s: 8
    • Component/s: core-libs
    • b93
    • Verified

      Doing a first bind, then a second with an argument, it fails with:Exception in thread "main" java.lang.IllegalArgumentException: no argument type to append

      If no argument is passed, the previously bound this is still the context when doing the second call.

      var obj = {
          hello:"From obj",
      };
      var obj2 = {
          hello:"From obj2",
      };

      function doit(cb){
          cb();
          var cb2 = cb.bind( obj2, "This one is not acccepted");
          cb2();
      }

      doit(function(){
              print(this.hello);
          }.bind(obj));

            Assignee:
            Attila Szegedi
            Reporter:
            Jean-Francois Denise (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: