Christian Sousa
06/17/2020, 2:16 PMexpect fun foo(font: UIFont)
I mean, having some platform specific parameter on the expect?
Or do I have to resort to use Any
?
Thanks!russhwolf
06/17/2020, 2:20 PMChristian Sousa
06/17/2020, 2:23 PMexpect fun foo(expect font: UIFont)
russhwolf
06/17/2020, 2:26 PMexpect fun foo(font: Font)
expect class Font
Christian Sousa
06/17/2020, 2:45 PMactual class Font = UIFont
?russhwolf
06/17/2020, 2:45 PMChristian Sousa
06/17/2020, 2:46 PMExpecting a top level declaration
russhwolf
06/17/2020, 2:47 PMChristian Sousa
06/17/2020, 2:49 PMrusshwolf
06/17/2020, 2:49 PMactual typealias Font = ...
Christian Sousa
06/17/2020, 2:50 PMrusshwolf
06/17/2020, 2:50 PMFont
to the platform-specific typeactual class
defines a new classChristian Sousa
06/17/2020, 2:50 PMexpect class Font
as well?russhwolf
06/17/2020, 2:50 PMexpect class
Christian Sousa
06/17/2020, 2:51 PMrusshwolf
06/17/2020, 2:51 PMChristian Sousa
06/17/2020, 2:58 PMexpected
methods and using an OptionalExpectation?
Something like:
@OptionalExpectation
expect fun foo(bar: String)
@OptionalExpectation
expect fun foo(foo: String)
And then on the platform specific only implementing the one we want? For example the first one being for Android and the second one for iOSrusshwolf
06/17/2020, 2:59 PM@OptionalExpectation
only works for annotationsChristian Sousa
06/17/2020, 3:00 PM