In my KMM project, I have a variable of type Custo...
# multiplatform
l
In my KMM project, I have a variable of type CustomClass<Session?>, where Session is a data class and CustomClass<T> is a class that uses a generic. I noticed that when I access this variable in Swift, the type is CustomClass<Session>. CustomClass also has a variable of type T, which Kotlin sees as Session?, and Swift sees as Session. When Kotlin sets this inner variable equal to a Session Object, Swift sees the new value. When I set it equal to null, Swift sees the old value. Is this expected behavior? I would expect Swift to see the same types as Kotlin.
Reading the docs, it seems like it should be the other way around. The docs say that if CustomClass<T> has a variable or function return of type T in Kotlin, it should be T? in Obj-C/Swift.