skip extends Object during new type param creation; test for IDEA-57449

This commit is contained in:
anna
2013-01-08 14:26:33 +01:00
parent 93a7d9f158
commit 3e3d8cfd60
4 changed files with 20 additions and 1 deletions
@@ -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(',');
}
@@ -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>
}
}
@@ -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); }