inline superclass: non empty super constructor - field initialization (IDEADEV-40788)

This commit is contained in:
anna
2009-10-13 12:33:03 +04:00
parent 5f03ff5849
commit d7af310c3a
17 changed files with 274 additions and 58 deletions
@@ -0,0 +1,7 @@
class Test {
private final String field;
Test(){
field = "text";
}
}
@@ -0,0 +1,8 @@
class Super {
private final String field;
public Super() {
field = "text";
}
}
@@ -0,0 +1,5 @@
class Test extends Super{
Test(){
super();
}
}
@@ -0,0 +1,15 @@
class Test {
String s;
Test(String s){
super(s);
System.out.println("hello");
}
void foo() {
Test s = new Test(null);
s.bar();
}
void bar() {}
}
@@ -0,0 +1,15 @@
class Super {
String s;
Super(String s) {
if (s != null) {
this.s = s;
}
}
void foo() {
Super s = new Super(null);
s.bar();
}
void bar() {}
}
@@ -0,0 +1,6 @@
class Test extends Super{
Test(String s){
super(s);
System.out.println("hello");
}
}
@@ -0,0 +1,13 @@
class Test {
Test(String s){
super(s);
System.out.println("hello");
}
void foo() {
Test s = new Test(null);
s.bar();
}
void bar() {}
}
@@ -0,0 +1,13 @@
class Super {
Super(String s) {
if (s == null) return;
System.out.println("s:" + s);
}
void foo() {
Super s = new Super(null);
s.bar();
}
void bar() {}
}
@@ -0,0 +1,7 @@
class Test extends Super{
Test(String s){
super(s);
System.out.println("hello");
}
}