kotlin.Char
is defined in the following way:
public class Char private constructor() : Comparable<Char> {
...
}
Where Comparable<T>
is defined as:
public interface Comparable<in T> {
public operator fun compareTo(other: T): Int
}
So how comes a Char is Serializable
?
fun main(args: Array<String>) {
println('A'::class) // class kotlin.Char
println('A'::class.java) // char
println('A' is java.io.Serializable) // true
}
- Is it something added on compilation to Byte code?
- Is it documented anywhere?