summaryrefslogtreecommitdiff
path: root/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/AmbiguityReturnValueResolution.java
blob: 1512dd0abc4310760ffc6e5381f135b390aac5df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
public interface IDEA99969 {
  default IntStream distinct(Stream s) {
    return s.map(i -> <error descr="Inconvertible types; cannot cast '<lambda parameter>' to 'int'">(int) i</error>);
  }
}
interface Stream<T> {
  <R> Stream<R> map(Function<? super T, ? extends R> mapper);
  IntStream map(IntFunction<? super T> mapper);
  LongStream map(LongFunction<? super T> mapper);
}

interface Function<T, R> {
  public R apply(T t);
}

interface IntFunction<T> {
  public int applyAsInt(T t);
}

interface LongFunction<T> {
  public long applyAsLong(T t);
}


interface IntStream {}
interface LongStream {}