Change Signature: Retain formatting of existing parameters when parameter count/order changes

#KT-6412 Fixed
This commit is contained in:
Alexey Sedunov
2014-12-11 14:01:36 +03:00
parent ec5a01be31
commit ec608c5db2
10 changed files with 167 additions and 63 deletions
@@ -1 +1 @@
fun fun1(x1: Int, y1: Int): Int = x1 * 2 + fun1(x1, )
fun fun1(x1: Int, y1: Int) : Int = x1 * 2 + fun1(x1, )
@@ -1,15 +1,18 @@
trait T {
fun foo(a: Int = 1, b: String = "2")
fun foo(a: Int = 1,
b: String = "2")
}
open class A: T {
override fun foo(a: Int, b: String) {
override fun foo(a: Int,
b: String) {
throw UnsupportedOperationException()
}
}
class B: A() {
override fun foo(a: Int, b: String) {
override fun foo(a: Int,
b: String) {
throw UnsupportedOperationException()
}
}
@@ -0,0 +1,6 @@
fun foo(
n: Int, s: String,
a: Any, l: Long
) {
}
@@ -0,0 +1,6 @@
fun <caret>foo(
n: Int, s: String,
a: Any
) {
}
@@ -0,0 +1,3 @@
fun foo() {
}
@@ -0,0 +1,6 @@
fun <caret>foo(
n: Int, s: String,
a: Any
) {
}
@@ -0,0 +1,5 @@
fun <caret>foo(
n: Int, s: String
) {
}
@@ -0,0 +1,6 @@
fun <caret>foo(
n: Int, s: String,
a: Any
) {
}