Closed
Description
The following code:
/** @interface */
class FooInterface {
/** @return {string} */
foo() {};
}
/**
* @implements {FooInterface}
*/
class Foo {
/** @return {string} */
foo() {
return '';
}
}
Produces the warning:
WARNING - property foo already defined on interface FooInterface; use @override to override it
foo() {
^^^^^^^
The documentation at https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler#override seems to suggest that this shouldn't be necessary:
[The
@override
tag] is not required when a class extends a superclass or implements an interface
This is with the internal flag set RECOMMENDED_FLAGS
. I didn't see a way to repro it on the closure compiler service. Googlers can see cl/220008730 internally, or repro with
blaze build //experimental/users/rictic/override-implement-interface:bin
Metadata
Metadata
Assignees
Labels
No labels