Change Signature: Implement improved call processing algorithm

#KT-8953 Fixed
 #KT-9525 Fixed
This commit is contained in:
Alexey Sedunov
2015-11-03 20:46:50 +03:00
parent b334f92748
commit 6ff955b66c
23 changed files with 471 additions and 204 deletions
@@ -0,0 +1,16 @@
fun <caret>foo(a: Int, b: Int, d: Int, c: Int, e: Int) {
}
fun test() {
foo(1,
2,
4, 3, 5)
foo(1, 2,
4, 3, 5)
foo(
1,
2,
4, 3, 5
)
}
@@ -0,0 +1,16 @@
fun <caret>foo(a: Int, b: Int, c: Int) {
}
fun test() {
foo(1,
2,
3)
foo(1, 2,
3)
foo(
1,
2,
3
)
}
@@ -0,0 +1,29 @@
fun foo(a: String, c: Boolean = false, block: (String) -> Unit) {
block(a)
}
fun test() {
foo("Hello", c = true) {
println(it)
}
foo("Hello", true) {
println(it)
}
foo("Hello", c = true) {
println(it)
}
foo("Hello") {
println(it)
}
foo("Hello") {
println(it)
}
foo("Hello") {
println("Don't let $it go!")
}
}
@@ -0,0 +1,29 @@
fun <caret>foo(a: String, b: Boolean = false, c: Boolean = false, block: (String) -> Unit) {
block(a)
}
fun test() {
foo("Hello", b = false, c = true) {
println(it)
}
foo("Hello", false, true) {
println(it)
}
foo("Hello", c = true) {
println(it)
}
foo("Hello", b = false) {
println(it)
}
foo("Hello", false) {
println(it)
}
foo("Hello") {
println("Don't let $it go!")
}
}
@@ -0,0 +1,13 @@
fun <caret>foo(b: Int, c: Int) {
}
fun test() {
foo(2,
3)
foo(2, 3)
foo(
2,
3
)
}
@@ -0,0 +1,16 @@
fun <caret>foo(a: Int, b: Int, c: Int) {
}
fun test() {
foo(1,
2,
3)
foo(1, 2,
3)
foo(
1,
2,
3
)
}
@@ -0,0 +1,13 @@
fun <caret>foo(a: Int, c: Int) {
}
fun test() {
foo(1,
3)
foo(1, 3)
foo(
1,
3
)
}
@@ -0,0 +1,16 @@
fun <caret>foo(a: Int, b: Int, c: Int) {
}
fun test() {
foo(1,
2,
3)
foo(1, 2,
3)
foo(
1,
2,
3
)
}
@@ -0,0 +1,13 @@
fun <caret>foo(a: Int, b: Int) {
}
fun test() {
foo(1,
2)
foo(1, 2)
foo(
1,
2
)
}
@@ -0,0 +1,16 @@
fun <caret>foo(a: Int, b: Int, c: Int) {
}
fun test() {
foo(1,
2,
3)
foo(1, 2,
3)
foo(
1,
2,
3
)
}
@@ -0,0 +1,16 @@
fun <caret>foo(c: Int, b: Int, a: Int) {
}
fun test() {
foo(3,
2,
1)
foo(3, 2,
1)
foo(
3,
2,
1
)
}
@@ -0,0 +1,16 @@
fun <caret>foo(a: Int, b: Int, c: Int) {
}
fun test() {
foo(1,
2,
3)
foo(1, 2,
3)
foo(
1,
2,
3
)
}