google / google/closure-compiler
Add warnings for incorrect use of goog.abstractMethod
Open
enhancement
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
Just spent some time on an issue that boiled down to:
```
/** @constructor */
example.Foo = goog.abstractMethod;
example.Foo.prototype.bar = goog.abstractMethod;
```
which should have been
```
/** @constructor */
example.Foo = function() {};
example.Foo.prototype.bar = goog.abstractMethod;
```
The compiler removed example.Foo entirely, so then a `goog.inherits(example.SubFoo, example.Foo)` call later on failed. We should warn for incorrect uses of goog.abstractMethod so this doesn't happen.
Contributor guide
Assessment
This issue has not been assessed yet.