Introduce Parameter: Fix parameter name validation

Respect existing parameter names and fix some exceptions

 #KT-19439 Fixed
 #KT-20402 Fixed
 #KT-20403 Fixed
This commit is contained in:
Alexey Sedunov
2017-09-28 16:38:11 +03:00
parent bf3769f37e
commit 790b615fa1
8 changed files with 56 additions and 6 deletions
@@ -0,0 +1,3 @@
class Foo(i: Int) {
val x = <selection>1 + 2</selection> + 3
}
@@ -0,0 +1,3 @@
class Foo(i: Int, i1: Int = 1 + 2) {
val x = i1 + 3
}
@@ -0,0 +1,3 @@
fun foo(i: Int) {
val x = <selection>1 + 2</selection> + 3
}
@@ -0,0 +1,3 @@
fun foo(i: Int, i1: Int = 1 + 2) {
val x = i1 + 3
}
@@ -0,0 +1,9 @@
class A : B({ "${<selection>C.c</selection>}" })
class C() {
companion object {
val c = 23
}
}
open class B(param: () -> String)
@@ -0,0 +1,9 @@
class A(val i: Int = C.c) : B({ "$i" })
class C() {
companion object {
val c = 23
}
}
open class B(param: () -> String)