Hello,
The following code :
package test;
import java.util.Comparator;
import java.util.Map;
import java.util.TreeMap;
public class Test {
public static void main(String[] args) {
Map<MyEnum, Boolean> mutableSortedCopy = new TreeMap<>(Test.create());
}
static <T extends Enum<T>> Comparator<T> create() {
return Comparator.comparing(e -> e.ordinal());
}
enum MyEnum {
A, B
}
}
gives Cannot infer type arguments for TreeMap<> with 4.39 RC2 (3.19.1200.v20260226-0420). I did not have the error in 4.38 and javac has no issue with it ; I did not test previous 4.39 RCs
Hello,
The following code :
gives
Cannot infer type arguments for TreeMap<>with 4.39 RC2 (3.19.1200.v20260226-0420). I did not have the error in 4.38 and javac has no issue with it ; I did not test previous 4.39 RCs