eclipse-jdt / eclipse-jdt/eclipse.jdt.core
revisit post-inference compatibility check
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 47
Description
Carried over from https://bugs.eclipse.org/506741 :
> Dan claims ecj has a bug: https://bugs.openjdk.java.net/browse/JDK-8164611 (might be a future language enhancement though :) ).
A quick check reveals that we rule out one method in `Scope.parameterCompatibilityLevel(MethodBinding, TypeBinding[], InvocationSite)` by the code section commented thusly:
> 1.8+ Post inference compatibility check policy: For non-functional-type arguments, trust inference. For functional type arguments apply compatibility checks after inference has completed to ensure arguments that were not pertinent to applicability which have only seen potential compatibility checks are actually compatible.
@srikanth-sankaran it seems your strategy is better than allowed. OTOH, it may as well compensate for extra-constituational smartness in javac, just at a slightly different scope. So if removing that section causes a lot of harm we should probably prefer being "too smart" over "looking dumb" ;-P
Contributor guide
Assessment
This issue has not been assessed yet.