-
Notifications
You must be signed in to change notification settings - Fork 615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
generics type inline function call serializer<T>()
fail in kotlin/native
#2676
Comments
if defined a module like
can fix this issue, but it is not flexible |
@Gargantua7 You need to add |
And this sample work fine on Android or JVM, so i think it maybe a bug on Native |
I ran the code snippet in jvm test but failed with |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry that I not apply So It seems to be the effect of the plugin, and it does not take effect on Native |
Can you share your demo project? As I am failing both in unit test and Android application.
I doubt that if it is possible to add an annotation to an existing type when passing to an inline function, or create a new type for the plugin. |
this is the sample project, maybe you should configuration the android sdk in local.properties: |
Intresting, if the statement |
Will plans to fix it or remove the feature ? This will determine if I end up keeping it as is or using |
@Gargantua7 I meant to put that annotation at the class declaration. It doesn't work as part of a function type parameter (erasure). If you want to have the function work, have another (non-reified) version of the function that takes the serializer as parameter. |
Sorry that the class is declaration at third party or standary library (eg. Number, BigDecimal), so I have no way to put to the annotation
In fact it will work fine in the JVM's library module, discussed above |
Hi, I see that the report is essentially is about If you give it a second thought, this construction is kinda unnecessary. What is the point of calling Related issues and discussions: |
Caller passing in KSerializer is indeed a good alternative. THX |
Describe the bug
Here is the sample
and call it in swift
then crash
Environment
The text was updated successfully, but these errors were encountered: