-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P2
-
Affects Version/s: 8, 8-repo-lambda
-
Component/s: tools
-
b86
-
Verified
Javac's interpretation of intersection type cast applied to a lambda/method reference does not follow the JLS. Javac checks that the intersection type is like the following:
SAM & ZAM1 ... ZAMn
The spec text mandates that:
*) the whole intersection must be a SAM, call its descriptor D
*) there must be a SAM in the intersection whose descriptor is the same as D - that is the primary target used for code generation
SAM & ZAM1 ... ZAMn
The spec text mandates that:
*) the whole intersection must be a SAM, call its descriptor D
*) there must be a SAM in the intersection whose descriptor is the same as D - that is the primary target used for code generation