-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refine the check for overriding interface methods.
One interface method overrides another only if the overrider is in a subinterface of the overridden. This is the first bullet in [JLS §9.4.1.1](https://docs.oracle.com/javase/specs/jls/se17/html/jls-9.html#jls-9.4.1.1). Remove a test that was checking for the old behaviour. It was intended to fix a bug in Dagger, but Dagger now works fine without this fix, and has its own test for the relevant situation. RELNOTES=In `MoreElements.overrides` and `.getLocalAndInheritedMethods`, an interface method is no longer considered to override another interface method unless the first interface inherits from the second. This means that `.getLocalAndInheritedMethods` may now return two methods with the same signature where before it only returned one. PiperOrigin-RevId: 403430316
- Loading branch information
1 parent
c0ed322
commit d8c1934
Showing
3 changed files
with
35 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters