blob: 5ecd4f5f77ff29143c1c8187c6a9290adc111756 (
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
27
28
29
30
|
class IntStream {
private void foo(IntStream s) {
s.map(i -> <error descr="Operator '<<' cannot be applied to 'int', '<lambda parameter>'">1 << i</error>);
s.map<error descr="Ambiguous method call: both 'IntStream.map(IntUnaryOperator)' and 'IntStream.map(ObjIntFunction<Integer>)' match">(i -> 1)</error>;
s.map<error descr="Ambiguous method call: both 'IntStream.map(IntUnaryOperator)' and 'IntStream.map(ObjIntFunction<T>)' match">(i -> i)</error>;
}
public static void main(String[] args) {
new IntStream().foo(null);
}
private IntStream <warning descr="Private method 'map(IntUnaryOperator)' is never used">map</warning>(IntUnaryOperator mapper) {
System.out.println(mapper);
return null;
}
private <T> IntStream <warning descr="Private method 'map(ObjIntFunction<T>)' is never used">map</warning>(ObjIntFunction<T> mapper) {
System.out.println(mapper);
return null;
}
}
interface IntUnaryOperator {
public int applyAsInt(int operand);
}
interface ObjIntFunction<T> {
public T apply(int i);
}
|