Repository navigation
Conversation
…h a wildcard bound
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 32 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
…ildcard bounds Define "ground target type" in the Javadoc of groundTargetJavaType and document when it throws. Detect an intersection by its kind, and explain why a cast to DeclaredType is not enough. Test raw functional bounds, unbounded wildcards (including one whose type parameter has a bound), and parenthesized lambdas and method references.
Land before #8657.
The Checker Framework crashed with an
IndexOutOfBoundsExceptioninAnnotatedTypeFactory.makeGroundTargetTypeon a lambda or method reference whose target is an intersection type with a wildcard-parameterized bound, such as:javac's type for such a lambda is the intersection type, not the functional interface, so
makeGroundTargetTyperead type arguments from a type that has none. NowgetFnInterfaceFromTreepasses the bound of javac's intersection type that instantiates the functional interface.The new test
framework/tests/all-systems/IntersectionCastWildcard.javacrashes without the fix.