google / google/closure-compiler
Emit a warning when a superclass method is not called
Open
enhancement
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
``` js
// ==ClosureCompiler==
// @compilation_level ADVANCED_OPTIMIZATIONS
// @output_file_name default.js
// @use_closure_library true
// @warning_level VERBOSE
// ==/ClosureCompiler==
goog.require('goog.events.EventTarget');
/**
* @constructor
* @extends {goog.events.EventTarget}
*/
var f = function() {
};
/** @override */
f.prototype.dispatchEvent = function(e) {};
```
Since dispatchEvent doesn't call goog.base(this, 'dispatchEvent') or equivalent, we should emit an optional warning but we currently do not. Similar to https://github.com/google/closure-compiler/issues/278 which is about constructors not methods.
Contributor guide
Assessment
This issue has not been assessed yet.