Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/overloadResolution/IDEA102800.java
Tagir Valeev c449c341b7 [java-highlighting] test-data adjusted (mostly anchors) after recent updates
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)

GitOrigin-RevId: 1e1b77009dc78de49c7cc5c44d4704937397bb23
2025-01-29 11:35:30 +00:00

32 lines
1.0 KiB
Java

import java.util.function.IntFunction;
import java.util.function.IntUnaryOperator;
import java.util.function.Supplier;
import java.util.stream.IntStream;
import java.util.stream.Stream;
class Test {
interface IntStream1 {
Stream<Integer> map(IntFunction<Integer> mapper);
IntStream1 map(IntUnaryOperator mapper);
Stream<Integer> boxed();
}
void fooBar(IntStream1 instr){
Supplier<Stream<Integer>> si = () -> instr.map <error descr="Ambiguous method call: both 'IntStream1.map(IntFunction<Integer>)' and 'IntStream1.map(IntUnaryOperator)' match">((i) -> (( i % 2) == 0) ? i : -i)</error>.boxed();
System.out.println(si);
Supplier<Stream<Integer>> si1 = () -> instr.map <error descr="Ambiguous method call: both 'IntStream1.map(IntFunction<Integer>)' and 'IntStream1.map(IntUnaryOperator)' match">(null)</error>.boxed();
System.out.println(si1);
}
}
class TestInitial {
void fooBar(){
Supplier<Stream<Integer>> si = () -> IntStream.range(0, 20).map((i) -> ((i % 2) == 0) ? i : -i).boxed();
System.out.println(si);
}
}