create static inner class if new expression is inside this/super constructor call (IDEA-45530)

This commit is contained in:
anna
2010-10-28 11:50:35 +04:00
parent 7ae3e5f625
commit 79bb22d0fa
5 changed files with 65 additions and 1 deletions
@@ -0,0 +1,12 @@
// "Create Inner Class 'Generic'" "true"
class Base {
void foo(){}
}
class Test extends Base {
Test() {
super.foo(new Generic<String> ());
}
private class Generic<T> {
}
}
@@ -0,0 +1,11 @@
// "Create Inner Class 'Generic'" "true"
class Test {
Test() {
this (new Generic<String> ());
}
Test(String s){}
private static class Generic<T> {
}
}
@@ -0,0 +1,9 @@
// "Create Inner Class 'Generic'" "true"
class Base {
void foo(){}
}
class Test extends Base {
Test() {
super.foo(new <caret>Generic<String> ());
}
}
@@ -0,0 +1,8 @@
// "Create Inner Class 'Generic'" "true"
class Test {
Test() {
this (new <caret>Generic<String> ());
}
Test(String s){}
}