FIR: Fix overridability rule for Java declarations with different return type kinds

See the class at org/jmock/Expectations
public <T> T with(Matcher<T> matcher);
public boolean with(Matcher<Boolean> matcher);

When we extending such class it we start assuming
that fake generic override overrides both of the overridden that is wrong
from POV of Java and it fails at FIR ultimate build

NB: It's hard to write a test because such Expectation-like
class is impossible to write in pure Java
This commit is contained in:
Denis.Zharkov
2021-10-28 11:38:20 +03:00
committed by TeamCityServer
parent 2e37ec6f0c
commit 360d67410d
10 changed files with 95 additions and 10 deletions
@@ -0,0 +1,6 @@
package test;
import java.util.List;
public class B extends A {
public <T> T foo(List<T> t) { return null; }
public boolean foo(List<Boolean> t) { return false; }
}