Replace explicit parameter with it : correct handling of it from outer lambda #KT-12437 Fixed

(cherry picked from commit cb8fe96)
This commit is contained in:
Mikhail Glukhikh
2016-06-16 18:02:10 +03:00
committed by Mikhail Glukhikh
parent b44c94a887
commit bd8c7577e1
3 changed files with 22 additions and 5 deletions
@@ -0,0 +1,9 @@
// IS_APPLICABLE: false
// See KT-12437: it from outer lambda
fun acceptLambda(p: Int, f: (Int) -> Int): Int = f(p)
fun use() {
acceptLambda(1) {
acceptLambda(2) { <caret>p2 -> it * 10 + p2 }
}.hashCode()
}