https://kotlinlang.org logo
#announcements
Title
# announcements
l

liminal

06/21/2017, 1:08 PM
hey all, i have a couple of String fields for which I declared typealias.
typealias Username = String
and
typealias Password = String
. Aside from controlling access level via packages and imports, is there any way to have an extension function such as Password.encrypt() restricted to apply to Password type only? Currently, if I define it on Password, it applies to all Strings including Username