Properly process default lambda source mapping
#KT-21827 Fixed
This commit is contained in:
@@ -221,15 +221,19 @@ class MethodInliner(
|
||||
setLambdaInlining(true)
|
||||
val lambdaSMAP = info.node.classSMAP
|
||||
|
||||
val sourceMapper = if (inliningContext.classRegeneration && !inliningContext.isInliningLambda)
|
||||
NestedSourceMapper(sourceMapper, lambdaSMAP.intervals, lambdaSMAP.sourceInfo)
|
||||
else
|
||||
InlineLambdaSourceMapper(sourceMapper.parent!!, info.node)
|
||||
val childSourceMapper =
|
||||
if (inliningContext.classRegeneration && !inliningContext.isInliningLambda)
|
||||
NestedSourceMapper(sourceMapper, lambdaSMAP.intervals, lambdaSMAP.sourceInfo)
|
||||
else if (info is DefaultLambda) {
|
||||
NestedSourceMapper(sourceMapper.parent!!, lambdaSMAP.intervals, lambdaSMAP.sourceInfo)
|
||||
}
|
||||
else InlineLambdaSourceMapper(sourceMapper.parent!!, info.node)
|
||||
|
||||
val inliner = MethodInliner(
|
||||
info.node.node, lambdaParameters, inliningContext.subInlineLambda(info),
|
||||
newCapturedRemapper, true /*cause all calls in same module as lambda*/,
|
||||
"Lambda inlining " + info.lambdaClassType.internalName,
|
||||
sourceMapper, inlineCallSiteInfo, null
|
||||
childSourceMapper, inlineCallSiteInfo, null
|
||||
)
|
||||
|
||||
val varRemapper = LocalVarRemapper(lambdaParameters, valueParamShift)
|
||||
@@ -243,7 +247,7 @@ class MethodInliner(
|
||||
StackValue.onStack(info.invokeMethod.returnType).put(bridge.returnType, this)
|
||||
setLambdaInlining(false)
|
||||
addInlineMarker(this, false)
|
||||
sourceMapper.endMapping()
|
||||
childSourceMapper.endMapping()
|
||||
inlineOnlySmapSkipper?.markCallSiteLineNumber(remappingMethodAdapter)
|
||||
}
|
||||
else if (isAnonymousConstructorCall(owner, name)) { //TODO add method
|
||||
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// FILE: 1.kt
|
||||
// SKIP_INLINE_CHECK_IN: bar$default
|
||||
package test
|
||||
|
||||
inline fun bar(f: () -> String = { "OK" }) = f()
|
||||
// FILE: 2.kt
|
||||
|
||||
import test.*
|
||||
// SKIP_INLINE_CHECK_IN: foo$default
|
||||
inline fun foo(f: () -> String = { bar() }) = f()
|
||||
|
||||
fun box(): String {
|
||||
return foo()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
// FILE: 1.kt
|
||||
// SKIP_INLINE_CHECK_IN: lParams$default
|
||||
package test
|
||||
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
|
||||
|
||||
inline fun lParams(initParams: () -> String = { "OK" }): String {
|
||||
return initParams()
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return run {
|
||||
lParams()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
// FILE: 1.kt
|
||||
// SKIP_INLINE_CHECK_IN: lParams$default
|
||||
package test
|
||||
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
|
||||
inline fun kValue() = "K"
|
||||
|
||||
inline fun lParams(initParams: () -> String = {
|
||||
"O" + kValue()
|
||||
}): String {
|
||||
val z = "body"
|
||||
return initParams()
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return run {
|
||||
lParams()
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: 1.smap
|
||||
SMAP
|
||||
1.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 1.kt
|
||||
test/_1Kt
|
||||
*L
|
||||
1#1,38:1
|
||||
34#1,2:39
|
||||
*E
|
||||
|
||||
SMAP
|
||||
1.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 1.kt
|
||||
test/_1Kt$lParams$1
|
||||
+ 2 1.kt
|
||||
test/_1Kt
|
||||
*L
|
||||
1#1,38:1
|
||||
29#2:39
|
||||
*E
|
||||
*S KotlinDebug
|
||||
*F
|
||||
+ 1 1.kt
|
||||
test/_1Kt$lParams$1
|
||||
*L
|
||||
32#1:39
|
||||
*E
|
||||
|
||||
// FILE: 2.smap
|
||||
|
||||
SMAP
|
||||
2.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 2.kt
|
||||
_2Kt
|
||||
+ 2 1.kt
|
||||
test/_1Kt
|
||||
+ 3 1.kt
|
||||
test/_1Kt$lParams$1
|
||||
*L
|
||||
1#1,10:1
|
||||
31#2,5:11
|
||||
29#2:17
|
||||
32#3:16
|
||||
*E
|
||||
*S KotlinDebug
|
||||
*F
|
||||
+ 1 2.kt
|
||||
_2Kt
|
||||
*L
|
||||
5#1,5:11
|
||||
5#1:17
|
||||
5#1:16
|
||||
*E
|
||||
@@ -0,0 +1,148 @@
|
||||
// FILE: 1.kt
|
||||
// SKIP_INLINE_CHECK_IN: lParams$default
|
||||
package test
|
||||
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
|
||||
inline fun kValue() = "K"
|
||||
|
||||
inline fun lParams(initParams: () -> String = {
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
"O" + kValue()
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
}): String {
|
||||
val z = "body"
|
||||
return initParams()
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return run {
|
||||
lParams()
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: 1.smap
|
||||
SMAP
|
||||
1.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 1.kt
|
||||
test/_1Kt
|
||||
*L
|
||||
1#1,74:1
|
||||
70#1,2:75
|
||||
*E
|
||||
|
||||
SMAP
|
||||
1.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 1.kt
|
||||
test/_1Kt$lParams$1
|
||||
+ 2 1.kt
|
||||
test/_1Kt
|
||||
*L
|
||||
1#1,74:1
|
||||
29#2:75
|
||||
*E
|
||||
*S KotlinDebug
|
||||
*F
|
||||
+ 1 1.kt
|
||||
test/_1Kt$lParams$1
|
||||
*L
|
||||
50#1:75
|
||||
*E
|
||||
|
||||
// FILE: 2.smap
|
||||
|
||||
SMAP
|
||||
2.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 2.kt
|
||||
_2Kt
|
||||
+ 2 1.kt
|
||||
test/_1Kt
|
||||
+ 3 1.kt
|
||||
test/_1Kt$lParams$1
|
||||
*L
|
||||
1#1,10:1
|
||||
31#2:11
|
||||
70#2,2:12
|
||||
29#2:15
|
||||
50#3:14
|
||||
68#3:16
|
||||
*E
|
||||
*S KotlinDebug
|
||||
*F
|
||||
+ 1 2.kt
|
||||
_2Kt
|
||||
*L
|
||||
5#1:11
|
||||
5#1,2:12
|
||||
5#1:15
|
||||
5#1:14
|
||||
5#1:16
|
||||
*E
|
||||
+131
@@ -0,0 +1,131 @@
|
||||
// FILE: 1.kt
|
||||
// SKIP_INLINE_CHECK_IN: lParams$default
|
||||
package test
|
||||
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
|
||||
inline fun kValue(crossinline s: () -> String) = { s() + "K" }()
|
||||
|
||||
inline fun lParams(initParams: () -> String = {
|
||||
"" + kValue { "O" }
|
||||
}): String {
|
||||
val z = "body"
|
||||
return initParams()
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return lParams()
|
||||
}
|
||||
|
||||
// FILE: 1.smap
|
||||
SMAP
|
||||
1.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 1.kt
|
||||
test/_1Kt
|
||||
*L
|
||||
1#1,38:1
|
||||
34#1,2:39
|
||||
*E
|
||||
|
||||
SMAP
|
||||
1.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 1.kt
|
||||
test/_1Kt$lParams$1
|
||||
+ 2 1.kt
|
||||
test/_1Kt
|
||||
*L
|
||||
1#1,38:1
|
||||
29#2:39
|
||||
*E
|
||||
*S KotlinDebug
|
||||
*F
|
||||
+ 1 1.kt
|
||||
test/_1Kt$lParams$1
|
||||
*L
|
||||
32#1:39
|
||||
*E
|
||||
|
||||
SMAP
|
||||
1.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 1.kt
|
||||
test/_1Kt$kValue$1
|
||||
+ 2 1.kt
|
||||
test/_1Kt$lParams$1
|
||||
*L
|
||||
1#1,38:1
|
||||
32#2:39
|
||||
*E
|
||||
|
||||
SMAP
|
||||
1.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 1.kt
|
||||
test/_1Kt$kValue$1
|
||||
*L
|
||||
1#1,38:1
|
||||
*E
|
||||
|
||||
// FILE: 2.smap
|
||||
|
||||
SMAP
|
||||
2.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 2.kt
|
||||
_2Kt
|
||||
+ 2 1.kt
|
||||
test/_1Kt
|
||||
+ 3 1.kt
|
||||
test/_1Kt$lParams$1
|
||||
*L
|
||||
1#1,8:1
|
||||
31#2,5:9
|
||||
29#2:15
|
||||
32#3:14
|
||||
*E
|
||||
*S KotlinDebug
|
||||
*F
|
||||
+ 1 2.kt
|
||||
_2Kt
|
||||
*L
|
||||
5#1,5:9
|
||||
5#1:15
|
||||
5#1:14
|
||||
*E
|
||||
+133
@@ -0,0 +1,133 @@
|
||||
// FILE: 1.kt
|
||||
// SKIP_INLINE_CHECK_IN: lParams$default
|
||||
package test
|
||||
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
|
||||
inline fun kValue(crossinline s: () -> String) = { s() + "K" }()
|
||||
|
||||
inline fun lParams(initParams: () -> String = {
|
||||
"" + kValue { "O" }
|
||||
}): String {
|
||||
val z = "body"
|
||||
return initParams()
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return run {
|
||||
lParams()
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: 1.smap
|
||||
SMAP
|
||||
1.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 1.kt
|
||||
test/_1Kt
|
||||
*L
|
||||
1#1,38:1
|
||||
34#1,2:39
|
||||
*E
|
||||
|
||||
SMAP
|
||||
1.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 1.kt
|
||||
test/_1Kt$lParams$1
|
||||
+ 2 1.kt
|
||||
test/_1Kt
|
||||
*L
|
||||
1#1,38:1
|
||||
29#2:39
|
||||
*E
|
||||
*S KotlinDebug
|
||||
*F
|
||||
+ 1 1.kt
|
||||
test/_1Kt$lParams$1
|
||||
*L
|
||||
32#1:39
|
||||
*E
|
||||
|
||||
SMAP
|
||||
1.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 1.kt
|
||||
test/_1Kt$kValue$1
|
||||
+ 2 1.kt
|
||||
test/_1Kt$lParams$1
|
||||
*L
|
||||
1#1,38:1
|
||||
32#2:39
|
||||
*E
|
||||
|
||||
SMAP
|
||||
1.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 1.kt
|
||||
test/_1Kt$kValue$1
|
||||
*L
|
||||
1#1,38:1
|
||||
*E
|
||||
|
||||
// FILE: 2.smap
|
||||
|
||||
SMAP
|
||||
2.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 2.kt
|
||||
_2Kt
|
||||
+ 2 1.kt
|
||||
test/_1Kt
|
||||
+ 3 1.kt
|
||||
test/_1Kt$lParams$1
|
||||
*L
|
||||
1#1,10:1
|
||||
31#2,5:11
|
||||
29#2:17
|
||||
32#3:16
|
||||
*E
|
||||
*S KotlinDebug
|
||||
*F
|
||||
+ 1 2.kt
|
||||
_2Kt
|
||||
*L
|
||||
5#1,5:11
|
||||
5#1:17
|
||||
5#1:16
|
||||
*E
|
||||
@@ -0,0 +1,95 @@
|
||||
// FILE: 1.kt
|
||||
// SKIP_INLINE_CHECK_IN: lParams$default
|
||||
package test
|
||||
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
|
||||
|
||||
inline fun lParams(initParams: () -> String = {
|
||||
"OK"
|
||||
}): String {
|
||||
val z = "body"
|
||||
return initParams()
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return run {
|
||||
lParams()
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: 1.smap
|
||||
SMAP
|
||||
1.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 1.kt
|
||||
test/_1Kt
|
||||
*L
|
||||
1#1,37:1
|
||||
33#1,2:38
|
||||
*E
|
||||
|
||||
SMAP
|
||||
1.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 1.kt
|
||||
test/_1Kt$lParams$1
|
||||
*L
|
||||
1#1,37:1
|
||||
*E
|
||||
|
||||
// FILE: 2.smap
|
||||
|
||||
SMAP
|
||||
2.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 2.kt
|
||||
_2Kt
|
||||
+ 2 1.kt
|
||||
test/_1Kt
|
||||
+ 3 1.kt
|
||||
test/_1Kt$lParams$1
|
||||
*L
|
||||
1#1,10:1
|
||||
30#2,5:11
|
||||
31#3:16
|
||||
*E
|
||||
*S KotlinDebug
|
||||
*F
|
||||
+ 1 2.kt
|
||||
_2Kt
|
||||
*L
|
||||
5#1,5:11
|
||||
5#1:16
|
||||
*E
|
||||
@@ -51,9 +51,12 @@ Kotlin
|
||||
_2Kt
|
||||
+ 2 1.kt
|
||||
test/_1Kt
|
||||
+ 3 1.kt
|
||||
test/_1Kt$inlineFun$1
|
||||
*L
|
||||
1#1,9:1
|
||||
6#2,2:10
|
||||
6#3:12
|
||||
*E
|
||||
*S KotlinDebug
|
||||
*F
|
||||
@@ -61,4 +64,5 @@ test/_1Kt
|
||||
_2Kt
|
||||
*L
|
||||
6#1,2:10
|
||||
6#1:12
|
||||
*E
|
||||
@@ -0,0 +1,93 @@
|
||||
// FILE: 1.kt
|
||||
// SKIP_INLINE_CHECK_IN: lParams$default
|
||||
package test
|
||||
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
//A lot of blank lines [Don't delete]
|
||||
|
||||
|
||||
inline fun lParams(initParams: () -> String = {
|
||||
"OK"
|
||||
}): String {
|
||||
val z = "body"
|
||||
return initParams()
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return lParams()
|
||||
}
|
||||
|
||||
// FILE: 1.smap
|
||||
SMAP
|
||||
1.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 1.kt
|
||||
test/_1Kt
|
||||
*L
|
||||
1#1,37:1
|
||||
33#1,2:38
|
||||
*E
|
||||
|
||||
SMAP
|
||||
1.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 1.kt
|
||||
test/_1Kt$lParams$1
|
||||
*L
|
||||
1#1,37:1
|
||||
*E
|
||||
|
||||
// FILE: 2.smap
|
||||
|
||||
SMAP
|
||||
2.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 2.kt
|
||||
_2Kt
|
||||
+ 2 1.kt
|
||||
test/_1Kt
|
||||
+ 3 1.kt
|
||||
test/_1Kt$lParams$1
|
||||
*L
|
||||
1#1,8:1
|
||||
30#2,5:9
|
||||
31#3:14
|
||||
*E
|
||||
*S KotlinDebug
|
||||
*F
|
||||
+ 1 2.kt
|
||||
_2Kt
|
||||
*L
|
||||
5#1,5:9
|
||||
5#1:14
|
||||
*E
|
||||
+51
@@ -1234,6 +1234,12 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt21827.kt")
|
||||
public void testKt21827() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("noInline.kt")
|
||||
public void testNoInline() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt");
|
||||
@@ -3029,6 +3035,51 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/smap/default")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Default extends AbstractIrBlackBoxInlineCodegenTest {
|
||||
public void testAllFilesPresentInDefault() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/default"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("inlinInDefault.kt")
|
||||
public void testInlinInDefault() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlinInDefault.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("inlinInDefault2.kt")
|
||||
public void testInlinInDefault2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlinInDefault2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineAnonymousInDefault.kt")
|
||||
public void testInlineAnonymousInDefault() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlineAnonymousInDefault.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineAnonymousInDefault2.kt")
|
||||
public void testInlineAnonymousInDefault2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlineAnonymousInDefault2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt21827.kt")
|
||||
public void testKt21827() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/kt21827.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/simple.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
+51
@@ -1234,6 +1234,12 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt21827.kt")
|
||||
public void testKt21827() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("noInline.kt")
|
||||
public void testNoInline() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt");
|
||||
@@ -3029,6 +3035,51 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/smap/default")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Default extends AbstractIrCompileKotlinAgainstInlineKotlinTest {
|
||||
public void testAllFilesPresentInDefault() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/default"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("inlinInDefault.kt")
|
||||
public void testInlinInDefault() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlinInDefault.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("inlinInDefault2.kt")
|
||||
public void testInlinInDefault2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlinInDefault2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineAnonymousInDefault.kt")
|
||||
public void testInlineAnonymousInDefault() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlineAnonymousInDefault.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineAnonymousInDefault2.kt")
|
||||
public void testInlineAnonymousInDefault2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlineAnonymousInDefault2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt21827.kt")
|
||||
public void testKt21827() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/kt21827.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/simple.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
@@ -1234,6 +1234,12 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt21827.kt")
|
||||
public void testKt21827() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("noInline.kt")
|
||||
public void testNoInline() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt");
|
||||
@@ -3029,6 +3035,51 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/smap/default")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Default extends AbstractBlackBoxInlineCodegenTest {
|
||||
public void testAllFilesPresentInDefault() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/default"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("inlinInDefault.kt")
|
||||
public void testInlinInDefault() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlinInDefault.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("inlinInDefault2.kt")
|
||||
public void testInlinInDefault2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlinInDefault2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineAnonymousInDefault.kt")
|
||||
public void testInlineAnonymousInDefault() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlineAnonymousInDefault.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineAnonymousInDefault2.kt")
|
||||
public void testInlineAnonymousInDefault2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlineAnonymousInDefault2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt21827.kt")
|
||||
public void testKt21827() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/kt21827.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/simple.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
+51
@@ -1234,6 +1234,12 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt21827.kt")
|
||||
public void testKt21827() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("noInline.kt")
|
||||
public void testNoInline() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt");
|
||||
@@ -3029,6 +3035,51 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/smap/default")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Default extends AbstractCompileKotlinAgainstInlineKotlinTest {
|
||||
public void testAllFilesPresentInDefault() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/default"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("inlinInDefault.kt")
|
||||
public void testInlinInDefault() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlinInDefault.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("inlinInDefault2.kt")
|
||||
public void testInlinInDefault2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlinInDefault2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineAnonymousInDefault.kt")
|
||||
public void testInlineAnonymousInDefault() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlineAnonymousInDefault.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineAnonymousInDefault2.kt")
|
||||
public void testInlineAnonymousInDefault2() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlineAnonymousInDefault2.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt21827.kt")
|
||||
public void testKt21827() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/kt21827.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/simple.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
+6
@@ -188,6 +188,12 @@ public class InlineDefaultValuesTestsGenerated extends AbstractInlineDefaultValu
|
||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
||||
}
|
||||
|
||||
@TestMetadata("kt21827.kt")
|
||||
public void testKt21827() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("noInline.kt")
|
||||
public void testNoInline() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt");
|
||||
|
||||
Reference in New Issue
Block a user