Can we have some sort of bounded (must-be-same) star projections?
Copy code
fun <T : SomeClass<*>> SomeOtherClass<*>.function() {...}
Such that we can guarantee the two star-projections must be equal? I know we can introduce another generic, but that'll lead to redefine that explicitly twice like
function<T<E>, E>
when calling the function. So is there any way we can omit that extra generic and use some implicit kind of thing?
t
tseisel
10/03/2020, 7:24 PM
Afaik no, you need to introduce a generic parameter. You may use typealiases to replace long redondant generic types