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

dhkim

02/21/2017, 1:00 PM
When deciding on which one of overloaded functions are invoked, why isn't nullability considered?
Copy code
fun func(a: Any?) {}

fun <T> func(a: Collection<T>) {}

fun main(args: Array<String>) {
	func(null) // Type inference fails here
}
i

ilya.gorbunov

02/21/2017, 3:23 PM
d

dhkim

02/21/2017, 3:28 PM
Thanks. I was considering to report it. You saved my time (and possibly someone's in your team. 😉 )
3 Views