J2K: replace overloads with optional parameters not only for constructors but for methods too
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// ERROR: Val cannot be reassigned
|
||||
// ERROR: Val cannot be reassigned
|
||||
class A() {
|
||||
private val s = ""
|
||||
private val x = 0
|
||||
|
||||
overloads public constructor(p: Int, s: String, x: Int = 1) : this() {
|
||||
this.s = s
|
||||
this.x = x
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user