-
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.
Don't call
Types.asMemberOf
unnecessarily.
If method `m` is defined in class `C`, there's no point in calling `asMemberOf(C, m)`. `asMemberOf` is only useful when `m` is defined in a subtype of `C`. This is a very minor optimization, but it also avoids an issue where `asMemberOf` can return a method that has lost type annotations on its return type. We still have that issue for inherited methods, but at least in the common case of locally-defined methods we can avoid it. RELNOTES=Annotations on type parameters, like `abstract @nullable T foo()`, are now better propagated to fields and constructor parameters. PiperOrigin-RevId: 587175179
- Loading branch information
1 parent
f123c19
commit 92d881e
Showing
3 changed files
with
73 additions
and
13 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