I'm trying to instantiate a java class `class Buil...
# announcements
r
I'm trying to instantiate a java class
class Builder<T extends Builder<T>>
. In java, you just use
new SpaceToBatchLayer.Builder()
, however, Kotlin forces you to specify the type argument. Is there a way around this for interop w/ java?
s
pretty sure Kotlin doesn’t force you to specify the type argument if it can be inferred
can you post a quick MCVE to see if there’s anything funky about your situation?
c
This is a known problem. You can look at the issue on the tracker, there are a couple of work-arounds there too: https://youtrack.jetbrains.com/issue/KT-17186