Const and inline classes


#1

I would like to propose that const properties type restrictions are made more flexible to allow inline classes that wrap String or primitive type as well.

inline class MessageType(val id: Int) {
    companion object {
        const val Retransmission_Request = MessageType(0)
    }
}

This isn’t allowed currently. I wonder if you think it makes sense to allow this, as the runtime type of this field should be Int.
It would’ve been my temporary workaround for inline enum classes not yet being allowed (I am not on top of the discussion regarding this at the moment).


#2

Please follow https://youtrack.jetbrains.com/issue/KT-25915


#3

Sorry, and thanks!