// !DIAGNOSTICS: -UNUSED_PARAMETER // FILE: Test.java public class Test { static public void foo(String ... x) { } } // FILE: test.kt fun select(vararg x: T) = x[1] fun main(x: Array?) { Test.foo(*(select(arrayOf(""), null))) // no compilation errors before the fix, NPE }