java overload resolution: fix NPE

found by property testing

GitOrigin-RevId: b45cb07402ad58a37886b7f1b5afb62bca2746fe
This commit is contained in:
Anna.Kozlova
2019-12-04 09:58:00 +01:00
committed by intellij-monorepo-bot
parent 94a4084b0e
commit 4ad4e7d908
2 changed files with 18 additions and 1 deletions

View File

@@ -18,4 +18,20 @@ interface Node<<warning descr="Type parameter 'T' is never used">T</warning>> {
Node.of(1, Node.of(2), Node.of(3));
Node.<Integer>of(1, Node.<Integer>of(2), Node.<Integer> of(3));
}
}
class MyTest {
void foo(String... s) {
System.out.println(s);
}
<T> void foo(T t, String t3, T... s) {
System.out.println(t);
System.out.println(t3);
System.out.println(s);
}
{
foo(" ", " ", "");
}
}