https://kotlinlang.org logo
#kotlin-inject
Title
# kotlin-inject
l

leandro

03/29/2023, 1:09 PM
Does it make sense to support `inner class`es on kotlin-inject? Suppose I have:
Copy code
@Inject class Outer(val context: Context) {
  @Inject inner class Inner {
    fun useOuterContext() = context.getString(...)
  }
}
This fails to compile
Outer.Inner
with the message: "Constructor of inner class Inner can be called only with receiver of containing class"
e

evant

03/29/2023, 4:56 PM
Yeah seems reasonable as long as the outer class can be provided, feel free to open an issue.
l

leandro

03/29/2023, 5:50 PM
6 Views