Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/IncompleteDiamonds.java
Tagir Valeev b6806f1e7b [java-highlighting] IDEA-369375 A syntax error (PsiErrorElement) should suppress the surrounding error
Also: allow a custom highlighter to supersede the default one

GitOrigin-RevId: c7d7a8be3ef762c9516ed3b637d467d4b544af00
2025-03-20 10:06:39 +00:00

26 lines
450 B
Java

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);
}
}