Files
Tagir Valeev c449c341b7 [java-highlighting] test-data adjusted (mostly anchors) after recent updates
Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)

GitOrigin-RevId: 1e1b77009dc78de49c7cc5c44d4704937397bb23
2025-01-29 11:35:30 +00:00

28 lines
699 B
Java

import lombok.val;
import java.util.*;
class Test {
val field = <error descr="Incompatible types. Found: 'int', required: 'lombok.val'">0;</error>
void method(val param) {
int p = <error descr="Incompatible types. Found: 'lombok.val', required: 'int'">param</error>;
val i = 0;
int j = i + 1;
val a = new ArrayList<String>();
Object o = a.get(0);
val b = new ArrayList<>();
String s = b.<error descr="Incompatible types. Found: 'java.lang.Object', required: 'java.lang.String'">get</error>(0);
o = b.get(0);
for (val v : a) {
String vStr = v;
}
val x = 0;
<error descr="Cannot assign a value to final variable 'x'">x</error>++;
}
}