David Holas
10/10/2024, 10:28 AMinternal interface Logging {
val log: Logger
}
context(Logging) @HiddenFromObjC
internal fun <T> Iterable<T>.firstOrLogNull(): T? {
val first = this.firstOrNull()
if (first != null) {
return first
} else {
log.warn { "Iterable is empty!" }
return null
}
}
All works fine on Android, but iOS app just crashes with A bad access to memory
when accessing firstOfNull()
. Any ideas on how to get around that?ephemient
10/10/2024, 10:48 AMDavid Holas
10/10/2024, 10:56 AMDavid Holas
10/10/2024, 11:41 AMCLOVIS
10/11/2024, 7:18 AMephemient
10/11/2024, 7:39 AMDavid Holas
10/11/2024, 8:45 AM