类型不匹配:推断类型是T,但kotlin.Any是预期的

我有以下代码:

val map = HashMap<Int, Any>() fun <T> test(t: T) = map.put(0, t) // Type mismatch: inferred type is T but kotlin.Any was expected 

但是每个Kotlin类都有Any作为超类 ,那么为什么这个错误?

Kotlin language will be the best programming language for Android.