-
Notifications
You must be signed in to change notification settings - Fork 42
Closed
Labels
waiting for upstreamThis issue or PR is dependent on upstream Kotlin compiler changes/fixesThis issue or PR is dependent on upstream Kotlin compiler changes/fixes
Description
Description
Metro appears to support injecting classes with private constructors, which I am finding useful, thank you!
However, this does not work for generic classes with private constructors, this scenario results in a compiler crash:
genericclassprivateconstructorcompilercrash.txt
The example builds without crash when the constructor is made internal.
My actual use case is assisted injection, but the build crash appears to trigger without those extra bits.
I would like to see:
- No compiler crash
- Support this variation if possible, for consistency, otherwise generate normal build error.
Self-contained Reproducer
@Inject
class Generic<T> private constructor(value: T)
Metro version
Current 0.6.0-SNAPSHOT
Context
No response
Metadata
Metadata
Assignees
Labels
waiting for upstreamThis issue or PR is dependent on upstream Kotlin compiler changes/fixesThis issue or PR is dependent on upstream Kotlin compiler changes/fixes