apatrida
09/29/2015, 12:30 PMclass Subscriber<in T> {
}
class Observable<out T> {
public fun get(): T { return "" as T }
public fun subscribe(s: Subscriber<T>) { }
}
public fun foo() {
val obs: Observable<String> = Observable()
val sub: Subscriber<CharSequence> = Subscriber()
obs.subscribe(sub)
}
notice that there is no need for obsview type declaration or casting to another generic type.