Hello, I’m new in kotlin. Is there anyone who know...
# announcements
j
Hello, I’m new in kotlin. Is there anyone who knows Scala language? I wanna convert from a code written Scala to kotlin. I don’t have knowledges related bounded type. For example this is a code written Scala language.
Copy code
// scala
sealed trait Test[+A] {
   …
   def test[B >: A]: B
   …
}

// kotlin
Sealed class Test<out A> {
   …
   fun <A : B> test(): B.   // <— this is problem
   …
}
I want to make type B is a super type of A. Anyone who knows this problem??
r
fun <B, A : B> test(): B
j
thx!