Kotlin / KEEP

Kotlin Evolution and Enhancement Process
Apache License 2.0
3.29k stars 357 forks source link

`@JvmExposeBoxed` annotation for opening API of inline classes to Java #331

Open CommanderTvis opened 1 year ago

k163377 commented 7 months ago

I did not see an issue, so let me comment directly.

How about allowing this annotation to be given to a single constructor or function as well?

I think there are only a limited number of situations where value class would be a problem. Therefore, I feel that assigning value class on a per-class basis unnecessarily undermines the value of value class.

In addition, value class may not be defined or modified by the user. Examples are unsigned integers and kotlin.time.Duration.