mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 21:44:49 +07:00
process diamonds on safe delete of type parameter (IDEA-73968)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user