Cannot pass through a reference to a Kotlin functi...
# kotlin-native
n
Cannot pass through a reference to a Kotlin function as a parameter. There seems to be a C interop mismatch with incorrect mapping files being generated for the Paho MQTT Client library ( https://www.eclipse.org/paho/clients/c/ ).
Here is a MQTT subscribe example that is written in C. This example is included in the Paho MQTT Client library.
s
You have nullability mismatch.
onMessageReceived
can only handle non-null pointer, while callback is probably expected to take nullable pointer.
👍 1
n
Can be difficult at times to find out what the types are when there is so much noise involved (the boat load of comments that shouldn't be visible).
The message presented indicates two errors when there is only one which is a bit confusing (only the type on the first callback parameter needs to be corrected, not the second one).
Will the error reporting be improved to be clearer (aka less confusing)?