Fix JS source maps for return statement of inlined function

This commit is contained in:
Alexey Andreev
2017-05-05 22:52:53 +03:00
parent 5a4d3c5391
commit bad79dfa85
4 changed files with 36 additions and 6 deletions
+24
View File
@@ -0,0 +1,24 @@
inline fun foo(x: Int): String {
if (x == 1) {
return "a" +
x
}
print("!")
if (x == 2) {
return "b" +
x
}
println("#")
return x.toString()
}
fun bar(x: Int) {
println(foo(x + 1))
println("%")
}
// LINES: 2 3 4 7 9 10 11 14 16 * 20 * 2 3 3 7 9 10 10 14 16 20 21