mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
overload resolution: don't choose most specific method based on boxing property for vararg position (IDEA-163597)
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
class Main {
|
||||
private static void m(Integer... arr) {}
|
||||
|
||||
private static void m(int... arr) {}
|
||||
|
||||
{
|
||||
m<error descr="Ambiguous method call: both 'Main.m(Integer...)' and 'Main.m(int...)' match">(1, 2)</error>;
|
||||
}
|
||||
}
|
||||
+5
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -232,6 +232,10 @@ public class OverloadResolutionTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
public void testVarargComponentTypesShouldBeExcludedFromBoxingComparison() throws Exception {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
doTest(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user