Sam
02/21/2020, 3:15 PMDate
. I have it aliased on the jvm as
actual typealias Date = java.util.Date
I would like to define a method in the expect class called before(date: Date): Boolean
. Currently I’m doing it like:
expect fun Date.before(date: Date): Boolean
//jvm
actual fun Date.before(date: Date): Boolean {
return this.before(date)
}
This gives me a shadowing warning. Is there a way to do something like actual fun Date.before(date: Date): Boolean = java.util.Date.before
?ribesg
02/21/2020, 3:23 PMrusshwolf
02/21/2020, 3:25 PMSam
02/21/2020, 3:26 PMDate
to NSDate
and it doesn’t have a before method.ribesg
02/21/2020, 3:27 PMclass Date(val time: Long)
🙂 actually inline class
if they were serializable…Sam
02/21/2020, 3:30 PMribesg
02/21/2020, 3:35 PM.native
extension to get the platform typecurioustechizen
02/22/2020, 8:57 PM