Details
-
Bug
-
Resolution: Fixed
-
P2
-
8, 8-repo-lambda
-
b86
-
Verified
Description
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