google / google/closure-compiler

Compiler should error-check goog.bind calls

Open
#1,119 5 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.