Java to Kotlin converter: keep original placement of primary constructor body + better preserving of comments for constructor

This commit is contained in:
Valentin Kipyatkov
2014-06-25 17:44:38 +04:00
parent 88bdbb02f4
commit 947bf3c0ed
18 changed files with 184 additions and 93 deletions
@@ -0,0 +1,25 @@
//file
class A {
private int v;
// this is a primary constructor
A(int p) {
v = 1;
} // end of primary constructor body
// this is a secondary constructor
A() {
this(1);
} // end of secondary constructor body
}
class B {
private int x;
// this constructor will disappear
B(int x) {
this.x = x;
} // end of constructor body
void foo(){}
}