Skip to content

Remove InvalidTypeArgumentValidator for Kotlin codegen. - #5372

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_1016557731
Nov 20, 2026
Merged

copybara-service[bot] merged 1 commit into
masterfrom
test_1016557731

Conversation

@copybara-service

Copy link
Copy Markdown

Remove InvalidTypeArgumentValidator for Kotlin codegen.

Previously, InvalidTypeArgumentValidator rejected Kotlin codegen bindings when generic @Inject classes or @Modules had non-public bounds, or when non-public type arguments were combined with intersection or self-referencing bounds, because generated factories and callers had to spell out those type arguments or bounds on public signatures (b/438765237).

Now that all Kotlin generated _Factory, _MembersInjector, and _ProducesFactory classes drop type parameters from their public signatures and encapsulate generic bounds inside private *Internal<Nothing> helpers, all generic bound shapes compile cleanly without workarounds, allowing InvalidTypeArgumentValidator and its bound-inspection helpers to be removed.

RELNOTES=N/A

Previously, `InvalidTypeArgumentValidator` rejected Kotlin codegen bindings when generic `@Inject` classes or `@Module`s had non-public bounds, or when non-public type arguments were combined with intersection or self-referencing bounds, because generated factories and callers had to spell out those type arguments or bounds on public signatures (b/438765237).

Now that all Kotlin generated `_Factory`, `_MembersInjector`, and `_ProducesFactory` classes drop type parameters from their public signatures and encapsulate generic bounds inside `private` `*Internal<Nothing>` helpers, all generic bound shapes compile cleanly without workarounds, allowing `InvalidTypeArgumentValidator` and its bound-inspection helpers to be removed.

RELNOTES=N/A
PiperOrigin-RevId: 1026776761
@copybara-service
copybara-service Bot merged commit 0bbb566 into master Nov 20, 2026
4 checks passed
@copybara-service
copybara-service Bot deleted the test_1016557731 branch November 20, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant