https://kotlinlang.org logo
#kotlin-native
Title
# kotlin-native
t

Tristan

08/20/2022, 1:08 AM
Hello, does Kotlin native supports unsigned values? Currently running
Compiler version info: Konan: 1.7.0 / Kotlin: 1.7.20
I am getting these kind of errors
Copy code
api.cpp:14475:871: error: unknown type name 'libnative_kref_kotlin_UInt'; did you mean 'libnative_kref_kotlin_Int'?
api.cpp:14412:1533: error: unknown type name 'libnative_kref_kotlin_ULong'; did you mean 'libnative_kref_kotlin_Long'?
The documentation seems to say it should be supported.
Here the kind of code I use
Copy code
interface GetAppStartTimeUseCase {
    operator fun invoke(): UInt?
}
Copy code
class GetAppStartTimeUseCaseImpl : GetAppStartTimeUseCase {
    override operator fun invoke(): UInt = 0u
}
Not using unsigned makes the code compile
s

sergey.bogolepov

08/20/2022, 9:23 AM
Will be fixed in 1.8.0.
11 Views