mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 01:50:56 +07:00
don't calculate substitution for overload resolution applicability checks
This commit is contained in:
@@ -382,6 +382,9 @@ public class InferenceSession {
|
||||
if (expectedActualErrorMessage != null && myErrorMessages != null) {
|
||||
myErrorMessages.add(0, expectedActualErrorMessage);
|
||||
}
|
||||
if (isOverloadCheck()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
//proceed to B3 constraints
|
||||
else if (parameters != null && args != null && !isOverloadCheck()) {
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
class Foo {
|
||||
|
||||
public void foo(Set<String> types) { }
|
||||
|
||||
public void foo(Collection<Integer> types) { }
|
||||
|
||||
void m(final Stream<String> stringStream) {
|
||||
foo(stringStream.collect(Collectors.toSet()));
|
||||
}
|
||||
}
|
||||
@@ -267,6 +267,7 @@ public class OverloadResolutionTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testUnqualifiedStaticInterfaceMethodCallsOnInnerClasses() { doTest(false);}
|
||||
|
||||
public void testStaticMethodInSuperInterfaceConflictWithCurrentStatic() { doTest(false);}
|
||||
public void testOverloadsWithOneNonCompatible() { doTest(false);}
|
||||
|
||||
private void doTest() {
|
||||
doTest(true);
|
||||
|
||||
Reference in New Issue
Block a user