Dave Leeds
08/29/2018, 12:57 PMjmfayard
08/29/2018, 8:23 PMinline class Email
, I can define fun String.asEmail() : Email? // null if invalid
Dave Leeds
08/30/2018, 1:15 AMString
instead of an Email
). If we could choose to not allow Java to call Kotlin functions that have an inline class as a parameter (that is, ensure these functions can only have Kotlin callers), then init
blocks and private constructors become a possibility. For more information on this possible approach, there's a ticket you can follow here: https://youtrack.jetbrains.com/issue/KT-25461