mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 01:09:46 +07:00
new inference: reject varargs as method reference target
(cherry picked from commit 77017d7790b78c5bb20c591e2588c1eccd0f96d7)
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
class Test {
|
||||
|
||||
interface IntMapper {
|
||||
int map();
|
||||
}
|
||||
|
||||
interface LongMapper {
|
||||
long map();
|
||||
}
|
||||
|
||||
void m(IntMapper im1, IntMapper... im) { }
|
||||
void m(LongMapper... lm) { }
|
||||
|
||||
{
|
||||
m<error descr="Ambiguous method call: both 'Test.m(IntMapper, IntMapper...)' and 'Test.m(LongMapper...)' match">(this ::ii)</error>;
|
||||
}
|
||||
|
||||
int ii() {return 0;}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user