process diamonds on safe delete of type parameter (IDEA-73968)

This commit is contained in:
anna
2011-09-07 12:18:59 +02:00
parent 8fef5fc92d
commit b0d0f28f03
6 changed files with 59 additions and 12 deletions
@@ -0,0 +1,8 @@
public class Test<T<caret>T> {}
class Foo {
void test() {
Test<String> test = new Test<>();
Test<String> test2 = new Test<String>();
}
}
@@ -0,0 +1,8 @@
public class Test {}
class Foo {
void test() {
Test test = new Test();
Test test2 = new Test();
}
}
@@ -0,0 +1,8 @@
public class Test<<caret>T, U> {}
class Foo {
void test() {
Test<String, Long> test = new Test<>();
Test<String, Long> test2 = new Test<String, Long>();
}
}
@@ -0,0 +1,8 @@
public class Test<U> {}
class Foo {
void test() {
Test<Long> test = new Test<>();
Test<Long> test2 = new Test<Long>();
}
}
@@ -134,6 +134,16 @@ public class SafeDeleteTest extends MultiFileTestCase {
doSingleFileTest();
}
public void testLastTypeParam() throws Exception {
LanguageLevelProjectExtension.getInstance(getProject()).setLanguageLevel(LanguageLevel.JDK_1_7);
doSingleFileTest();
}
public void testTypeParamFromDiamond() throws Exception {
LanguageLevelProjectExtension.getInstance(getProject()).setLanguageLevel(LanguageLevel.JDK_1_7);
doSingleFileTest();
}
private void doTest(@NonNls final String qClassName) throws Exception {
doTest(new PerformAction() {
@Override