google / google/closure-compiler
Compiler should error-check goog.bind calls
Open
bug
Types
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
A common pattern is to do:
goog.bind(this.foo_, this, param1, param2, ...);
In this case, where the prototype of foo_ is defined as
MyClass.prototype.foo_ = function(param1, param2, ...) {
};
the compiler should check that the parameters passed to goog.bind match the first parameters declared on the prototype of foo_.
Contributor guide
Assessment
This issue has not been assessed yet.