Java to Kotlin converter: keep original placement of primary constructor body + better preserving of comments for constructor
This commit is contained in:
@@ -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(){}
|
||||
}
|
||||
Reference in New Issue
Block a user