PHondogo
07/20/2022, 3:15 PMabstract class SomeClass<T> {
abstract fun execute(): T
}
class SomeImplementation : SomeClass<String>() {
override fun execute(): String = "Test"
}
open class Test<S: SomeClass<T>, T>
class Test1 : Test<SomeImplementation, _>() // compiler complains about Unresolved reference: _
dmitriy.novozhilov
07/20/2022, 4:02 PMPHondogo
07/20/2022, 4:03 PMdmitriy.novozhilov
07/21/2022, 7:40 AM_
was introduced only to place where compiler uses type inference. In supertypes list there is no inference, compiler just uses specified type argumentsPHondogo
07/21/2022, 7:43 AMdmitriy.novozhilov
07/21/2022, 7:46 AM