<passing array to functional interface but get (Ar...
# stackoverflow
u
passing array to functional interface but get (Array&lt;out TypeVariable(T)&gt;) -&gt; Array&lt;out TypeVariable(T)&gt;? type mismatch val changeFirstElement = VarargsFunction { ss: Array -> ss[0] = ss[0]!! + " world" ss } val params = arrayOf("hello") } fun interface VarargsFunction { fun apply(vararg t: T): Array? } I get this following exception: Type mismatch: inferred type is (Array) -> Array? but (Array) -> Array? was expected Any suggestion why is this exception and how to resolve it? Thanks Playground link https://pl.kotl.in/kBwQZlCZj