Support when mapping transformation on inlining

This commit is contained in:
Michael Bogdanov
2016-03-11 12:08:23 +03:00
parent b88260b4f9
commit bec6126b06
14 changed files with 396 additions and 98 deletions
@@ -0,0 +1,28 @@
package test
enum class X {
A,
B
}
inline fun test(x: X, s: (X) -> String): String {
return s(x)
}
fun box(): String {
return test(X.A) {
when(it) {
X.A-> "O"
X.B-> "K"
}
} + test(X.B) {
when(it) {
X.A-> "O"
X.B-> "K"
}
}
}
// no additional mappings cause when in inline lambda (same module)
// 1 class test/.*\$WhenMappings