I could use some help. I have a multiplatform libr...
# kotlin-native
k
I could use some help. I have a multiplatform library project that has github actions setup for running nativeTest, jvmTest each on the matrix of operating systems linux, windows, and macos. All pass with the exception of linux nativeTest and it fails to compile with the error
Copy code
file:///home/runner/work/kotlin-lmdb/kotlin-lmdb/src/nativeMain/kotlin/Env.kt:111:78 Argument type mismatch: actual type is 'kotlin.UShort', but 'kotlin.UInt' was expected.
The project is located at https://github.com/CoreyKaylor/kotlin-lmdb and the failure I'm referring to is here. https://github.com/CoreyKaylor/kotlin-lmdb/actions/runs/13713581077 This seems like a possible bug with the compiler, or am I missing something?
a
The failure is on this line After of
mode.toUShort(8)
, could you try the KN conversion function? Something like
mode.toInt().convert...()
https://kotlinlang.org/docs/native-c-interop.html#portability The type is
mdb_mode_t
, which has a conditional type
k
Thanks, that fixed the issue. I'm surprised the error only manifested on a single OS. Appreciate the help.