Kroppeb
09/26/2019, 3:53 PMfun foo(){
bar(+"test")
bar(getValue("test"))
}
fun bar(t:Int){
}
fun <T>getValue(p: String):T = TODO()
operator fun <T>String.unaryPlus(): T = getValue(this)
Kroppeb
09/26/2019, 3:53 PMKroppeb
09/26/2019, 3:59 PMbar("test".unaryPlus())
does work tooKroppeb
09/26/2019, 4:04 PM