Jack Darlington
01/12/2021, 12:47 PMexpect abstract class Thing {
}
actual class Thing {
}
actual abstract class Thing {
}
Obviously the example above doesn't make sense, but it does if you are trying to typealias to already existing code. It is not a huge issue, but just wondered if it existed alreadyStan Potemkin
01/12/2021, 6:19 PMabstract
not everywhere?Jack Darlington
01/12/2021, 11:55 PMSwift:
class SwiftVersionOfSomething {
fun test(): String {
return "hi"
}
}
Android:
abstract class KotlinVersionOfSomething {
func test(): String {
return "hi"
}
}
I need the value of X on both, so in my common module I create. I have no control how they are instantiated and purely just need to access the x value for both
It would be useful if I could do something like
expect <Object_With_function> SharedVersionOfSomething {
fun test(): String
}
actual typealias SharedVersionOfSomething = KotlinVersionOfSomething
actual typealias SharedVersionOfSomething = SwiftVersionOfSomething
So basically, we just say we need some object of any type that has a particular function / variable regardless of type (class/abstract class/data class/object)Stan Potemkin
01/13/2021, 5:29 AMinterface
?Jozef Matus
01/13/2021, 8:15 PMkpgalligan
01/13/2021, 9:16 PMkpgalligan
01/13/2021, 9:17 PMJack Darlington
01/14/2021, 3:59 PM