dirk.dittert
02/19/2025, 9:14 AMIllegalArgumentException or Comparable). Are there any best practices on how to deal with that? For example, if there are any Java consumers, they would not expect a class to implement kotlin.Comparable but the Java equivalent. Is there a way to easily flag these cases with code analysis? Are there any downsides from a Kotlin perspective to not use native functionality?Sam
02/19/2025, 9:33 AMdirk.dittert
02/19/2025, 9:36 AMpublic actual interface Comparable in Kotlin. Is there a corresponding expect declaration somewhere and how can I navigate there?dirk.dittert
02/19/2025, 9:37 AMIllegalArgumentException that it just is a type alias.Sam
02/19/2025, 9:46 AMComparable and List are just magically translated by the compiler when targeting Java. I think it's mostly done that way because they were added to the stdlib before expect/actual was part of the language, but I may be wrong. I'll see if I can find some documentation about it.Sam
02/19/2025, 9:47 AMdirk.dittert
02/19/2025, 9:48 AMephemient
02/19/2025, 10:20 AMtypealias kotlin.coroutines.cancellation.CancellationException = java.util.concurrent.CancellationException
typealias kotlinx.coroutines.CancellationException = java.util.concurrent.CancellationExceptionephemient
02/19/2025, 10:22 AMkotlin.collections.Collection = java.util.Collection = kotlin.collections.MutableCollection (ditto for List and Set and Map) which are different types in Kotlin that map to the same platform type in Javadirk.dittert
02/19/2025, 10:23 AM