Skip to content

Drop type parameters from Kotlin generated _Factory classes. - #5368

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_1016557681
Nov 19, 2026
Merged

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

Conversation

@copybara-service

Copy link
Copy Markdown

Drop type parameters from Kotlin generated _Factory classes.

In Kotlin codegen, declaring type parameters on generated _Factory classes and their companion create / newInstance / provide* methods exposes non-public, intersection, or self-referencing bounds on the public factory signature (b/438765237).

Continuing the Kotlin factory codegen migration, this change removes type parameters from generated Kotlin _Factory classes and delegates public newInstance and provide* companion methods on generic classes and modules to private generic *Internal<Nothing> helpers so type parameter bounds remain encapsulated and callers no longer need explicit method type arguments.

RELNOTES=N/A

In Kotlin codegen, declaring type parameters on generated `_Factory` classes and their companion `create` / `newInstance` / `provide*` methods exposes non-public, intersection, or self-referencing bounds on the public factory signature (b/438765237).

Continuing the Kotlin factory codegen migration, this change removes type parameters from generated Kotlin `_Factory` classes and delegates public `newInstance` and `provide*` companion methods on generic classes and modules to `private` generic `*Internal<Nothing>` helpers so type parameter bounds remain encapsulated and callers no longer need explicit method type arguments.

RELNOTES=N/A
PiperOrigin-RevId: 1025816846
@copybara-service
copybara-service Bot merged commit 61b506b into master Nov 19, 2026
7 checks passed
@copybara-service
copybara-service Bot deleted the test_1016557681 branch November 19, 2026 20:43
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