/**
* [ERROR] error at
* [ERROR] util(list, (before, cur) -> before < cur);
* [ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^
* [ERROR] C:\workspace\plugin\aspectjTest\src\main\java\fish\Main.java:44:0::0 The left-hand side of an assignment must be a variable [ERROR] error at [ERROR] util(list, (before, cur) -> before < cur);
*/
public static void test() {
List<Integer> list = new ArrayList<>();
//1.compile error
// util(list, (before, cur) -> before < cur);
//2.compile success
util(list, (i1, i2) -> i1 < i2);
//3.compile success
util(list, (Integer before, Integer cur) -> before < cur);
}
public static <T> void util(Collection<T> list, BiPredicate<T, T> predicate) {}
jdk version:20
aspectj version :1.9.22
jdk version:20
aspectj version :1.9.22