-
Type:
Sub-task
-
Resolution: Delivered
-
Priority:
P4
-
Affects Version/s: 25
-
Component/s: tools
Prior to JDK 25, the `javac` compiler was allowing the type of lambda expressions to be classes in some cases. This implies that the `javac` compiler was accepting code like:
```
class Test {
void m() {
Test r = (Test & Runnable) () -> System.out.println("Hello, World!");
}
}
```
Starting from JDK 25 the `javac` compiler will reject lambda expressions which type is a class
```
class Test {
void m() {
Test r = (Test & Runnable) () -> System.out.println("Hello, World!");
}
}
```
Starting from JDK 25 the `javac` compiler will reject lambda expressions which type is a class