So... I'm not sure if this is a bug or something I just don't understand. I'm calling a function that returns a struct, which means a CValue<something>. It compiles fine, but at runtime I get: "Uncaught exception from Kotlin's main: Throwable: typeOf() is called with erased argument". What's going on?
o
olonho
04/08/2017, 7:20 AM
Henrik, could you post your minimal example on pastebin or here?
t
tunedal
04/08/2017, 10:49 AM
Here is a minimal example: https://pastebin.com/5p2KnQxm
The actual thing I was trying to do was to call xcb_setup_roots_iterator in the XCB library.
tunedal
04/08/2017, 11:57 AM
It looks like the readValue() call on the some_struct_t instance is what's failing.
Yay! 😁 Thanks for that. Now the XCB example code is working, although with lots of "warning: failed to obtain inline function declaration" everywhere. (And compiling the compiler from source was quite painless – less than 3 minutes.)