mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
skip extends Object during new type param creation; test for IDEA-57449
This commit is contained in:
@@ -178,9 +178,10 @@ public class PsiElementFactoryImpl extends PsiJavaParserFacadeImpl implements Ps
|
||||
public PsiTypeParameter createTypeParameter(String name, PsiClassType[] superTypes) {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("public <").append(name);
|
||||
if (superTypes.length > 0) {
|
||||
if (superTypes.length > 1) {
|
||||
builder.append(" extends ");
|
||||
for (PsiClassType type : superTypes) {
|
||||
if (type.equalsToText(CommonClassNames.JAVA_LANG_OBJECT)) continue;
|
||||
builder.append(type.getCanonicalText()).append(',');
|
||||
}
|
||||
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
abstract class A1<X>{
|
||||
abstract <T> void foo(T t, X x);
|
||||
}
|
||||
|
||||
class B1<T> extends A1<T>{
|
||||
@Override
|
||||
<T1> void foo(T1 t1, T t) {
|
||||
<selection>//To change body of implemented methods use File | Settings | File Templates.</selection>
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
abstract class A1<X>{
|
||||
abstract <T> void foo(T t, X x);
|
||||
}
|
||||
|
||||
class B1<T> extends A1<T>{
|
||||
<caret>
|
||||
}
|
||||
@@ -63,6 +63,7 @@ public class OverrideImplementTest extends LightCodeInsightTestCase {
|
||||
public void testSimplifyObjectWildcard() { doTest(false); }
|
||||
public void testErasureWildcard() { doTest(false); }
|
||||
public void testMultipleInterfaceInheritance() { doTest(false); }
|
||||
public void testResolveTypeParamConflict() { doTest(false); }
|
||||
|
||||
public void testImplementExtensionMethods() { doTest8(false, true); }
|
||||
public void testDoNotImplementExtensionMethods() { doTest8(false, true); }
|
||||
|
||||
Reference in New Issue
Block a user