Add test for issue KT-23582

This commit is contained in:
Roman Artemev
2018-04-06 15:41:43 +03:00
parent 2bea8816a6
commit 4cdd121c21
12 changed files with 104 additions and 0 deletions
@@ -0,0 +1,6 @@
package m1
inline fun foo(action: () -> Int): Int {
return action()
}
+13
View File
@@ -0,0 +1,13 @@
package m2
import m1.*
fun bar(): Int {
foo { return 100 }
return -99
}
fun box(): String {
if (bar() == 100) return "OK"
return "fail"
}
+10
View File
@@ -0,0 +1,10 @@
package m3
fun foofaa(): Unit { }
inline fun foo(action: () -> Int): Int {
foofaa()
return action()
}
+17
View File
@@ -0,0 +1,17 @@
package m4
import m3.*
inline fun foo(action: () -> Int): Int {
return action()
}
fun bar(): Int {
foo { return 100 }
return -99
}
fun box(): String {
if (bar() == 100) return "OK"
return "fail"
}