Hello! I've updated Kotlin compiler to 1.7.0 versi...
# compiler
p
Hello! I've updated Kotlin compiler to 1.7.0 version and want to use underscore operator for template parameters type infer in such code:
Copy code
abstract 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: _
d
You can use underscore only in explicit type arguments of function calls in bodies
p
Is there any reason for such limitation?
d
Support of
_
was introduced only to place where compiler uses type inference. In supertypes list there is no inference, compiler just uses specified type arguments
p
It's a pity.
d
Yeah, I know. We are aware of some boilerplate in specifying type arguments of super types and want to found some way to get rid of it, but right now we have more important things to do
­čÖĆ 1