SOE with recursive type parameter dependencies

This commit is contained in:
Anna Kozlova
2016-03-15 13:31:13 +01:00
parent 67de6a752d
commit 65ebda0fff
3 changed files with 20 additions and 1 deletions
@@ -0,0 +1,6 @@
class Test {
private <<error descr="Cyclic inheritance involving 'S'"></error>S extends K, K extends S> S b(S s) {
if (true) return b <error descr="'b(S)' in 'Test' cannot be applied to '()'">()</error>;
<error descr="Missing return statement">}</error>
}
@@ -571,6 +571,10 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, true);
}
public void testRecursiveBoundsDependencies() throws Exception {
doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false);
}
public void testLeastUpperBoundWithRecursiveTypes() throws Exception {
final PsiManager manager = getPsiManager();
final GlobalSearchScope scope = GlobalSearchScope.allScope(getProject());