Kurt Renzo Acosta
03/10/2020, 4:09 PM// Common
expect class MyClass {
...
expect val myVal: MyCommonType
}
// Target 1
actual class MyClass {
...
actual val myVal: MyTargetOneType
}
// Target 2
actual class MyClass {
actual val myVal: MyTargetTwoType
}
Currently, I just add them but not as expect/actual variables but I can't use them in commonrusshwolf
03/10/2020, 4:11 PMactual val myVal: MyCommonTime = MyTargetOneType()
but you can only interact with it in common as MyCommonType
Kurt Renzo Acosta
03/10/2020, 4:12 PMrusshwolf
03/10/2020, 4:13 PMilya.gorbunov
03/10/2020, 4:24 PMMyCommonType
and actualize it with type aliases to MyTargetOneType
and MyTargetTwoType
in those targets respectively.russhwolf
03/10/2020, 4:27 PMexpect class
or expect interface
. Can't be both at the same timeilya.gorbunov
03/10/2020, 4:45 PMbut the problem is on Android, it's an abstract class and on iOS, it's an interface.Yes, currently we have such a limitation, but also have a plan to lift it 🙂
russhwolf
03/10/2020, 5:04 PMLuoqiaoyou
03/11/2020, 2:39 PMsaket
04/26/2020, 7:34 AM