mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
IDEA-122616
This commit is contained in:
+2
-2
@@ -1,8 +1,8 @@
|
||||
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 << 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>;
|
||||
s.map<error descr="Ambiguous method call: both 'IntStream.map(IntUnaryOperator)' and 'IntStream.map(ObjIntFunction<Integer>)' match">(i -> i)</error>;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ class ReturnTypeIncompatibility {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
call<error descr="Ambiguous method call: both 'ReturnTypeIncompatibility.call(I1<P>)' and 'ReturnTypeIncompatibility.call(I2<P>)' match">(i-> {return i;})</error>;
|
||||
call<error descr="Ambiguous method call: both 'ReturnTypeIncompatibility.call(I1<Integer>)' and 'ReturnTypeIncompatibility.call(I2<P>)' match">(i-> {return i;})</error>;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
import java.util.function.Function;
|
||||
|
||||
class ChoiceBox<T> {
|
||||
static {
|
||||
ChoiceBox<Item> confParamField1 = new ChoiceBox<>("", p -> p.getName());
|
||||
ChoiceBox<Item> confParamField2 = new ChoiceBox<Item>("", p -> p.getName());
|
||||
}
|
||||
|
||||
public ChoiceBox(T... options) {}
|
||||
|
||||
public ChoiceBox(String caption, Function<T, String> itemCaption) {}
|
||||
|
||||
public static class Item {
|
||||
public String getName() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user