mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 06:11:42 +07:00
prevent diamonds in reference parameter list other than <> -> invalid PsiDiamondType in substitutors
(cherry picked from commit 4f7cc7a)
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
class Test {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Box<String> stringBox = new Box<String>("123");
|
||||
|
||||
stringBox.transform(new Fn<String,<error descr="Identifier expected"> </error>>() {});
|
||||
|
||||
}
|
||||
|
||||
static class Box<T> {
|
||||
T value;
|
||||
|
||||
Box(T value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public <O> Box<O> transform(Fn<T, O> fn) {
|
||||
return new Box<O>(fn.apply(value));
|
||||
}
|
||||
}
|
||||
|
||||
interface Fn<A, B> {
|
||||
B apply(A value);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user