Java to Kotlin converter: code refactorings after review
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
//file
|
||||
public class Test {
|
||||
private final String s;
|
||||
boolean b;
|
||||
double d;
|
||||
|
||||
public Test() {
|
||||
b = true;
|
||||
}
|
||||
|
||||
public Test(String s) {
|
||||
this.s = s;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
public fun Test(): Test {
|
||||
val __ = Test(null)
|
||||
__.b = true
|
||||
return __
|
||||
}
|
||||
|
||||
public fun Test(s: String): Test {
|
||||
return Test(s)
|
||||
}
|
||||
|
||||
public class Test(private val s: String) {
|
||||
var b: Boolean = false
|
||||
var d: Double = 0.toDouble()
|
||||
}
|
||||
Reference in New Issue
Block a user