mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 06:11:42 +07:00
new inference: avoid current type calculation during conflict resolution for target type detection (IDEA-121052)
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
import java.util.Comparator;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
|
||||
class TypeDetectionTest {
|
||||
|
||||
void main(Stream<Integer> of) {
|
||||
of.sorted(comparing(n -> n.doubleValue()));
|
||||
}
|
||||
|
||||
public static <T, U extends Comparable<? super U>> Comparator<T> comparing(Function<? super T, ? extends U> keyExtractor){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+4
@@ -122,6 +122,10 @@ public class NewLambdaHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testTargetTypeConflictResolverShouldNotTryToEvaluateCurrentArgumentType() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user