Does not replace explicit lambda parameter with 'it' if conflicting nested literal available #KT-11849 Fixed

This commit is contained in:
Mikhail Glukhikh
2016-04-15 17:35:08 +03:00
parent 2e1a2fa8d1
commit 3f266647f0
6 changed files with 70 additions and 0 deletions
@@ -0,0 +1,12 @@
// IS_APPLICABLE: false
inline fun <T, R> T.let(block: (T) -> R): R = block(this)
fun foo(arg: Any?): Int? {
return arg?.let {
<caret>x -> x.toString().let {
x.hashCode() + it.hashCode()
}
}
}