It's not able to infer the type parameter for the ...
# announcements
k
It's not able to infer the type parameter for the unaryplus. Is this a bug or am I missing something?
Copy code
fun 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)
image.png
bar("test".unaryPlus())
does work too