https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
a

andreasmattsson

12/23/2018, 11:28 AM
Hm... Would anyone be able to assist me in writing the
expected
annotation class for a common module, in order to in the jvm module write
actual typealias Headers = retrofit2.http.Headers
? Where the actual implementation is the following: https://github.com/square/retrofit/blob/master/retrofit/src/main/java/retrofit2/http/Headers.java I've tried a whole bunch of variations on
vararg val value: String
and
val value: Array<String>
but it seems regardless I get some variation on the error
The following declaration is incompatible because return type is different
?
t

thevery

12/24/2018, 10:04 PM
expect annotation class Headers
?
a

andreasmattsson

12/27/2018, 7:55 AM
Thanks, I'll follow the issue for now and leave out the value param as a workaround for now
j

jush

06/14/2021, 2:25 PM
I know it's two years old but I'm now facing the same issue. I'm not able to find a workaround. What do you mean by "leave out the value param as a workaround"?
in case somebody else ends up in this thread, there's a workaround https://youtrack.jetbrains.com/issue/KT-20900#focus=Comments-27-4983270.0-0
2 Views