overload resolution: don't reject first inapplicable vararg method

GitOrigin-RevId: 3e8246e5cbdab35327da0587aa62111b04f7dbed
This commit is contained in:
Anna Kozlova
2020-12-16 12:51:39 +01:00
committed by intellij-monorepo-bot
parent 97586f00b7
commit e9fb32668e
2 changed files with 23 additions and 7 deletions

View File

@@ -1,4 +1,23 @@
import java.util.stream.Stream;
class Order {
interface I { }
interface I2 { }
class Holder {
public void registerProblem(I i1,
String s,
I2 ... i2s) { }
public void registerProblem(Foo problemDescriptor) { }
}
class Foo {
void f(Stream<Foo> stream, Holder holder) {
stream.forEach(holder::registerProblem);
}
}
}
interface I {
void foo(String s, Object... params);
}