overload resolution: don't choose most specific method based on boxing property for vararg position (IDEA-163597)

This commit is contained in:
Anna.Kozlova
2016-11-17 17:10:53 +01:00
parent 908a86fd72
commit ccb61093af
3 changed files with 19 additions and 3 deletions
@@ -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>;
}
}
@@ -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);
}