J2K: replace overloads with optional parameters not only for constructors but for methods too
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
class A {
|
||||
public fun foo(p: Int) {
|
||||
println("p = [" + p + "]")
|
||||
}
|
||||
|
||||
synchronized public fun foo() {
|
||||
foo(calcSomething())
|
||||
}
|
||||
|
||||
// this method should be invoked under synchronized block!
|
||||
private fun calcSomething(): Int {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user