Fix @InlineMe generator: type variable patterns and bridge methods - #97
Merged
Conversation
Derive parameters from the generic signature, so type variables become `*` instead of their erasure, which can never match at a call site. Skip bridge and synthetic members, which carry a copy of the annotation of the method they delegate to. Read both the main and test type table, write the generated recipes to `build/generated`, and refresh the type tables to pick up Guava 33.7.0.
timtebeek
marked this pull request as ready for review
August 17, 2026 18:31
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
InlineMethodCallsRecipeGeneratorderived method pattern parameters from the erased descriptor, so type variables becamejava.lang.Objectand could never match a call site (Range#apply,BloomFilter#test, …); parameters are now taken from the generic signature, emitting*per type variable, with a fallback to the descriptor. Bridge and synthetic members are now skipped, as they carry a copy of the annotation of the method they delegate to and produced junk entries on private nested classes.The generator also now reads both the main and test type table (Guava lives in one, log4j-api in the other, and only the first was visible before), and writes to
build/generated, as the generated YAML is copied into rewrite-migrate-java rather than shipped from here. The type tables are refreshed, which picks up Guava 33.7.0-jre along with newer versions of the other+dependencies, and adds the previously missing eclipse-collections../gradlew generateInlineGuavaMethodsemits 69 recipes, set-identical to Update inline Guava recipes for Guava 33.7.0 rewrite-migrate-java#1207.