mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java-psi] One more test for lambda parameter type under ambiguous resolve
GitOrigin-RevId: 41a80dd4ce9f232d6e5cc273adc8f02dd1a01780
This commit is contained in:
committed by
intellij-monorepo-bot
parent
98de135081
commit
f6b5d7935a
+17
@@ -0,0 +1,17 @@
|
||||
import java.util.function.Function;
|
||||
import java.util.function.ToIntFunction;
|
||||
import java.util.function.ToLongFunction;
|
||||
import java.util.stream.IntStream;
|
||||
import java.util.stream.LongStream;
|
||||
|
||||
interface Test {
|
||||
default IntStream distinct2(Stream<String> s) {
|
||||
return s.map<error descr="Ambiguous method call: both 'Stream.map(Function<? super String, ?>)' and 'Stream.map(ToIntFunction<? super String>)' match">(i -> i.length())</error>;
|
||||
}
|
||||
}
|
||||
|
||||
interface Stream<T> {
|
||||
<R> Stream<R> map(Function<? super T, ? extends R> mapper);
|
||||
IntStream map(ToIntFunction<? super T> mapper);
|
||||
LongStream map(ToLongFunction<? super T> mapper);
|
||||
}
|
||||
+1
@@ -151,6 +151,7 @@ class NewLambdaHighlightingTest extends LightJavaCodeInsightFixtureTestCase5 {
|
||||
@Test void testLambdaWithExplicitTypeAndTargetTypeParameter() { doTest(); }
|
||||
@Test void testAmbiguousConstructorCallWithLambdaInside() { doTest(); }
|
||||
@Test void testMultiResolveSameFunction() {doTest();}
|
||||
@Test void testMultiResolveThreeFunctions() {doTest();}
|
||||
@Test void testWrongTargetTypeDoNotReportIncompatibleTypeInside() {doTest();}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user