Can I use
ULong as a parameter in function definition in Kotlin?
My code looks like below:
import androidx.compose.ui.graphics.Color fun EColor(value: ULong) = Color(value) val Red700 = EColor(0xffdd0d3c)
Conversion of signed constants to unsigned ones is prohibited
If I call
val Red700 = Color(0xffdd0d3c), then it works fine.
So how come I got this error?
There are unsigned literals in Kotlin. You write them by adding a
val Red700 = EColor(0xffdd0d3cU)
You can also call
val Red700 = EColor(0xffdd0d3c.toULong())