robstoll
03/20/2018, 11:20 AMfun <T> List<T>.foo(t: T)
Is there a way to force that a consumer of this function cannot inadvertently kind of widen the type to Any (which is fine due to List<out T>
). Or in other words, I would like to prevent the following: listOf(1).foo("bla")