You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Test {
private record Data(String value) {
}
Test(Collection<Data> data) {
data.stream().collect(Collectors.groupingBy(Data::value))
.entrySet().stream()
.filter(entry -> entry.getValue().size() > 1)
.forEach(entry -> {
throw new IllegalArgumentException("Duplicate value " + entry.getKey());
});
}
}
fails compilation with java: [expression.unparsable] Expression invalid in dependent type annotation: [error for expression: data.stream().collect(java.util.stream.Collectors.groupingBy(Data::value)); error: Invalid 'Data::value' because class com.github.javaparser.ast.expr.MethodReferenceExpr is not a supported expression]
on line
.filter(entry -> entry.getValue().size() > 1)
It is expected to compile without warnings
The text was updated successfully, but these errors were encountered:
Following test case
fails compilation with java: [expression.unparsable] Expression invalid in dependent type annotation: [error for expression: data.stream().collect(java.util.stream.Collectors.groupingBy(Data::value)); error: Invalid 'Data::value' because class com.github.javaparser.ast.expr.MethodReferenceExpr is not a supported expression]
on line
It is expected to compile without warnings
The text was updated successfully, but these errors were encountered: