Fix for KT-10259: Proguard can't find generated lambda class of lambda nested inside object?.let lambda

#Fixed KT-10259
This commit is contained in:
Michael Bogdanov
2015-12-10 16:19:41 +03:00
parent 9452c200a0
commit b950bf0e6e
10 changed files with 166 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
fun box(): String {
var encl1 = "fail";
var encl2 = "fail";
test {
{
encl1 = "OK"
{
encl2 = "OK"
}()
}()
}
return "OK"
}
inline fun test(s: () -> Unit) {
s()
}
// 2 INNERCLASS Kt10259Kt\$box\$\$inlined\$test\$lambda\$1
// 2 INNERCLASS Kt10259Kt\$box\$\$inlined\$test\$lambda\$lambda\$1
// 4 INNERCLASS

View File

@@ -0,0 +1,22 @@
fun box(): String {
var encl1 = "fail";
test {
encl1 = "OK"
}
return encl1
}
inline fun test(crossinline s: () -> Unit) {
{
{
s()
}()
}()
}
// 3 INNERCLASS Kt10259_2Kt\$test\$1 null
// 2 INNERCLASS Kt10259_2Kt\$test\$1\$1
// 2 INNERCLASS Kt10259_2Kt\$box\$\$inlined\$test\$1
// 2 INNERCLASS Kt10259_2Kt\$box\$\$inlined\$test\$lambda\$1
// 9 INNERCLASS

View File

@@ -0,0 +1,29 @@
fun box(): String {
var encl1 = "fail";
test {
{
{
encl1 = "OK"
}()
}()
}
return encl1
}
inline fun test(crossinline s: () -> Unit) {
{
{
s()
}()
}()
}
// 3 INNERCLASS Kt10259_3Kt\$test\$1 null
// 2 INNERCLASS Kt10259_3Kt\$test\$1\$1
// 2 INNERCLASS Kt10259_3Kt\$box\$\$inlined\$test\$1
// 2 INNERCLASS Kt10259_3Kt\$box\$\$inlined\$test\$lambda\$1
// inlined:
// 2 INNERCLASS Kt10259_3Kt\$box\$\$inlined\$test\$lambda\$lambda\$lambda\$1
// 2 INNERCLASS Kt10259_3Kt\$box\$\$inlined\$test\$lambda\$lambda\$lambda\$lambda\$1
// 13 INNERCLASS