Renames and test output format improvement
This commit is contained in:
@@ -38,6 +38,8 @@ data class ArgumentSliceProducer private constructor(
|
||||
return listOf(KotlinSliceUsage(argumentExpression, parent, mode, forcedExpressionMode = true))
|
||||
}
|
||||
|
||||
override val testPresentation = "ARGUMENT #$parameterIndex".let { if (isExtension) "$it EXTENSION" else it }
|
||||
|
||||
private fun extractArgumentExpression(refElement: PsiElement): PsiElement? {
|
||||
val refParent = refElement.parent
|
||||
return when {
|
||||
|
||||
@@ -49,6 +49,9 @@ object CallSliceProducer : SliceProducer {
|
||||
}
|
||||
}
|
||||
|
||||
override val testPresentation: String?
|
||||
get() = null
|
||||
|
||||
override fun equals(other: Any?) = other === this
|
||||
override fun hashCode() = 0
|
||||
|
||||
|
||||
@@ -145,16 +145,16 @@ class InflowSlicer(
|
||||
lambda.passToProcessor(mode.dropBehaviour())
|
||||
}
|
||||
|
||||
is LambdaArgumentInflowBehaviour -> {
|
||||
is LambdaParameterInflowBehaviour -> {
|
||||
val valueParameters = lambda.valueParameters
|
||||
if (valueParameters.isEmpty() && lambda is KtFunctionLiteral) {
|
||||
if (currentBehaviour.argumentIndex == 0) {
|
||||
if (currentBehaviour.parameterIndex == 0) {
|
||||
lambda.implicitItUsages().forEach {
|
||||
it.passToProcessor(mode.dropBehaviour())
|
||||
}
|
||||
}
|
||||
} else {
|
||||
valueParameters.getOrNull(currentBehaviour.argumentIndex)?.passToProcessor(mode.dropBehaviour())
|
||||
valueParameters.getOrNull(currentBehaviour.parameterIndex)?.passToProcessor(mode.dropBehaviour())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -238,9 +238,9 @@ class InflowSlicer(
|
||||
referencedDeclaration.passToProcessor(mode.dropBehaviour())
|
||||
}
|
||||
|
||||
is LambdaArgumentInflowBehaviour -> {
|
||||
is LambdaParameterInflowBehaviour -> {
|
||||
val parameter = (referencedDeclaration as? KtCallableDeclaration)
|
||||
?.valueParameters?.getOrNull(currentBehaviour.argumentIndex)
|
||||
?.valueParameters?.getOrNull(currentBehaviour.parameterIndex)
|
||||
parameter?.passToProcessor(mode.dropBehaviour())
|
||||
}
|
||||
|
||||
|
||||
@@ -34,5 +34,12 @@ data class LambdaCallsBehaviour(private val sliceProducer: SliceProducer) : Kotl
|
||||
get() = KotlinBundle.message("slicer.text.tracking.lambda.calls")
|
||||
|
||||
override val testPresentationPrefix: String
|
||||
get() = "[LAMBDA CALLS] "
|
||||
get() = buildString {
|
||||
append("[LAMBDA CALLS")
|
||||
sliceProducer.testPresentation?.let {
|
||||
append(" ")
|
||||
append(it)
|
||||
}
|
||||
append("] ")
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -9,7 +9,7 @@ import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
import org.jetbrains.kotlin.idea.findUsages.handlers.SliceUsageProcessor
|
||||
import org.jetbrains.kotlin.psi.KtElement
|
||||
|
||||
data class LambdaArgumentInflowBehaviour(val argumentIndex: Int) : KotlinSliceAnalysisMode.Behaviour {
|
||||
data class LambdaParameterInflowBehaviour(val parameterIndex: Int) : KotlinSliceAnalysisMode.Behaviour {
|
||||
override fun processUsages(element: KtElement, parent: KotlinSliceUsage, uniqueProcessor: SliceUsageProcessor) {
|
||||
InflowSlicer(element, uniqueProcessor, parent).processChildren(parent.forcedExpressionMode)
|
||||
}
|
||||
@@ -18,5 +18,5 @@ data class LambdaArgumentInflowBehaviour(val argumentIndex: Int) : KotlinSliceAn
|
||||
get() = KotlinBundle.message("slicer.text.tracking.lambda.argument")
|
||||
|
||||
override val testPresentationPrefix: String
|
||||
get() = "[LAMBDA ARGUMENT IN] "
|
||||
get() = "[LAMBDA PARAMETER #$parameterIndex] "
|
||||
}
|
||||
@@ -18,7 +18,7 @@ object LambdaReceiverInflowBehaviour : KotlinSliceAnalysisMode.Behaviour {
|
||||
get() = KotlinBundle.message("slicer.text.tracking.lambda.receiver")
|
||||
|
||||
override val testPresentationPrefix: String
|
||||
get() = "[LAMBDA RECEIVER IN] "
|
||||
get() = "[LAMBDA RECEIVER] "
|
||||
|
||||
override fun equals(other: Any?) = other === this
|
||||
override fun hashCode() = 0
|
||||
|
||||
@@ -227,9 +227,9 @@ class OutflowSlicer(
|
||||
if (receiverType == null || !receiverType.isFunctionType) return
|
||||
val isExtension = receiverType.isExtensionFunctionType
|
||||
val shift = if (isExtension) 1 else 0
|
||||
val argumentIndex = parameterDescriptor.index - shift
|
||||
val newMode = if (argumentIndex >= 0)
|
||||
mode.withBehaviour(LambdaArgumentInflowBehaviour(argumentIndex))
|
||||
val parameterIndex = parameterDescriptor.index - shift
|
||||
val newMode = if (parameterIndex >= 0)
|
||||
mode.withBehaviour(LambdaParameterInflowBehaviour(parameterIndex))
|
||||
else
|
||||
mode.withBehaviour(LambdaReceiverInflowBehaviour)
|
||||
receiver.passToProcessor(newMode)
|
||||
|
||||
@@ -57,6 +57,9 @@ object ReceiverSliceProducer : SliceProducer {
|
||||
}
|
||||
}
|
||||
|
||||
override val testPresentation: String?
|
||||
get() = "RECEIVER"
|
||||
|
||||
override fun equals(other: Any?) = other === this
|
||||
override fun hashCode() = 0
|
||||
}
|
||||
@@ -12,6 +12,8 @@ import org.jetbrains.kotlin.idea.findUsages.handlers.SliceUsageProcessor
|
||||
interface SliceProducer {
|
||||
fun produce(usage: UsageInfo, mode: KotlinSliceAnalysisMode, parent: SliceUsage): Collection<SliceUsage>?
|
||||
|
||||
val testPresentation: String?
|
||||
|
||||
override fun equals(other: Any?): Boolean
|
||||
override fun hashCode(): Int
|
||||
|
||||
@@ -20,6 +22,9 @@ interface SliceProducer {
|
||||
return null
|
||||
}
|
||||
|
||||
override val testPresentation: String?
|
||||
get() = null
|
||||
|
||||
override fun equals(other: Any?) = other === this
|
||||
override fun hashCode() = 0
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
8 val x = foo(<bold>fun(n: Int) = n</bold>)
|
||||
8 val x = foo(fun(n: Int) = <bold>n</bold>)
|
||||
8 val x = foo(fun(<bold>n: Int</bold>) = n)
|
||||
8 [LAMBDA CALLS] val x = foo(<bold>fun(n: Int) = n</bold>)
|
||||
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Int</bold>): Int {
|
||||
8 [LAMBDA CALLS ARGUMENT #0] val x = foo(<bold>fun(n: Int) = n</bold>)
|
||||
3 [LAMBDA CALLS ARGUMENT #0] fun foo(<bold>f: (Int) -> Int</bold>): Int {
|
||||
4 return f(<bold>1</bold>)
|
||||
|
||||
|
||||
@@ -8,6 +8,6 @@
|
||||
8 val x = foo(<bold>fun(n: Int) = n</bold>)
|
||||
8 val x = foo(fun(n: Int) = <bold>n</bold>)
|
||||
8 val x = foo(fun(<bold>n: Int</bold>) = n)
|
||||
8 [LAMBDA CALLS] val x = foo(<bold>fun(n: Int) = n</bold>)
|
||||
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Int</bold>): Int {
|
||||
8 [LAMBDA CALLS ARGUMENT #0] val x = foo(<bold>fun(n: Int) = n</bold>)
|
||||
3 [LAMBDA CALLS ARGUMENT #0] fun foo(<bold>f: (Int) -> Int</bold>): Int {
|
||||
4 return f(<bold>1</bold>)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
8 val x = foo(<bold>fun(n: Int): Int { return n }</bold>)
|
||||
8 val x = foo(fun(n: Int): Int { return <bold>n</bold> })
|
||||
8 val x = foo(fun(<bold>n: Int</bold>): Int { return n })
|
||||
8 [LAMBDA CALLS] val x = foo(<bold>fun(n: Int): Int { return n }</bold>)
|
||||
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Int</bold>): Int {
|
||||
8 [LAMBDA CALLS ARGUMENT #0] val x = foo(<bold>fun(n: Int): Int { return n }</bold>)
|
||||
3 [LAMBDA CALLS ARGUMENT #0] fun foo(<bold>f: (Int) -> Int</bold>): Int {
|
||||
4 return f(<bold>1</bold>)
|
||||
|
||||
|
||||
@@ -8,6 +8,6 @@
|
||||
8 val x = foo(<bold>fun(n: Int): Int { return n }</bold>)
|
||||
8 val x = foo(fun(n: Int): Int { return <bold>n</bold> })
|
||||
8 val x = foo(fun(<bold>n: Int</bold>): Int { return n })
|
||||
8 [LAMBDA CALLS] val x = foo(<bold>fun(n: Int): Int { return n }</bold>)
|
||||
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Int</bold>): Int {
|
||||
8 [LAMBDA CALLS ARGUMENT #0] val x = foo(<bold>fun(n: Int): Int { return n }</bold>)
|
||||
3 [LAMBDA CALLS ARGUMENT #0] fun foo(<bold>f: (Int) -> Int</bold>): Int {
|
||||
4 return f(<bold>1</bold>)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
9 val <bold>v = value</bold>
|
||||
9 val v = <bold>value</bold>
|
||||
8 foo(fun(<bold>value: Int</bold>) {
|
||||
8 [LAMBDA CALLS] foo(<bold>fun(value: Int) {</bold>
|
||||
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Unit</bold>) {
|
||||
8 [LAMBDA CALLS ARGUMENT #0] foo(<bold>fun(value: Int) {</bold>
|
||||
3 [LAMBDA CALLS ARGUMENT #0] fun foo(<bold>f: (Int) -> Unit</bold>) {
|
||||
4 f(<bold>1</bold>)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
9 val <bold>v = value</bold>
|
||||
9 val v = <bold>value</bold>
|
||||
8 foo(fun(<bold>value: Int</bold>) {
|
||||
8 [LAMBDA CALLS] foo(<bold>fun(value: Int) {</bold>
|
||||
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Unit</bold>) {
|
||||
8 [LAMBDA CALLS ARGUMENT #0] foo(<bold>fun(value: Int) {</bold>
|
||||
3 [LAMBDA CALLS ARGUMENT #0] fun foo(<bold>f: (Int) -> Unit</bold>) {
|
||||
4 f(<bold>1</bold>)
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
8 [LAMBDA IN] val x = foo(1, 2) { <bold>{ it }</bold> }
|
||||
8 val x = foo(1, 2) { <bold>{ it }</bold> }
|
||||
8 val x = foo(1, 2) { { <bold>it</bold> } }
|
||||
8 [LAMBDA CALLS] val x = foo(1, 2) { <bold>{ it }</bold> }
|
||||
8 [LAMBDA CALLS] val x = foo(1, 2) <bold>{ { it } }</bold>
|
||||
8 [LAMBDA CALLS] [LAMBDA CALLS] val x = foo(1, 2) <bold>{ { it } }</bold>
|
||||
3 [LAMBDA CALLS] [LAMBDA CALLS] fun foo(a: Int, b: Int, <bold>f: (Int) -> (Int) -> Int</bold>): Int {
|
||||
4 [LAMBDA CALLS] return <bold>f(a)</bold>(b)
|
||||
8 [LAMBDA CALLS ARGUMENT #0] val x = foo(1, 2) { <bold>{ it }</bold> }
|
||||
8 [LAMBDA CALLS ARGUMENT #0] val x = foo(1, 2) <bold>{ { it } }</bold>
|
||||
8 [LAMBDA CALLS] [LAMBDA CALLS ARGUMENT #0] val x = foo(1, 2) <bold>{ { it } }</bold>
|
||||
3 [LAMBDA CALLS] [LAMBDA CALLS ARGUMENT #0] fun foo(a: Int, b: Int, <bold>f: (Int) -> (Int) -> Int</bold>): Int {
|
||||
4 [LAMBDA CALLS ARGUMENT #0] return <bold>f(a)</bold>(b)
|
||||
4 return f(a)(<bold>b</bold>)
|
||||
3 fun foo(a: Int, <bold>b: Int</bold>, f: (Int) -> (Int) -> Int): Int {
|
||||
8 val x = foo(1, <bold>2</bold>) { { it } }
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
8 [LAMBDA IN] val x = foo(1, 2) { <bold>{ it }</bold> }
|
||||
8 val x = foo(1, 2) { <bold>{ it }</bold> }
|
||||
8 val x = foo(1, 2) { { <bold>it</bold> } }
|
||||
8 [LAMBDA CALLS] val x = foo(1, 2) { <bold>{ it }</bold> }
|
||||
8 [LAMBDA CALLS] val x = foo(1, 2) <bold>{ { it } }</bold>
|
||||
8 [LAMBDA CALLS] [LAMBDA CALLS] val x = foo(1, 2) <bold>{ { it } }</bold>
|
||||
3 [LAMBDA CALLS] [LAMBDA CALLS] fun foo(a: Int, b: Int, <bold>f: (Int) -> (Int) -> Int</bold>): Int {
|
||||
4 [LAMBDA CALLS] return <bold>f(a)</bold>(b)
|
||||
8 [LAMBDA CALLS ARGUMENT #0] val x = foo(1, 2) { <bold>{ it }</bold> }
|
||||
8 [LAMBDA CALLS ARGUMENT #0] val x = foo(1, 2) <bold>{ { it } }</bold>
|
||||
8 [LAMBDA CALLS] [LAMBDA CALLS ARGUMENT #0] val x = foo(1, 2) <bold>{ { it } }</bold>
|
||||
3 [LAMBDA CALLS] [LAMBDA CALLS ARGUMENT #0] fun foo(a: Int, b: Int, <bold>f: (Int) -> (Int) -> Int</bold>): Int {
|
||||
4 [LAMBDA CALLS ARGUMENT #0] return <bold>f(a)</bold>(b)
|
||||
4 return f(a)(<bold>b</bold>)
|
||||
3 fun foo(a: Int, <bold>b: Int</bold>, f: (Int) -> (Int) -> Int): Int {
|
||||
8 val x = foo(1, <bold>2</bold>) { { it } }
|
||||
|
||||
+6
-6
@@ -1,18 +1,18 @@
|
||||
4 f("", <bold>1</bold>)
|
||||
15 val v = <bold>it</bold>
|
||||
14 [LAMBDA CALLS] foo <bold>{</bold>
|
||||
3 [LAMBDA CALLS] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
|
||||
14 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{</bold>
|
||||
3 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
|
||||
4 f("", <bold>1</bold>)
|
||||
|
||||
6 "".f(<bold>2</bold>)
|
||||
15 val v = <bold>it</bold>
|
||||
14 [LAMBDA CALLS] foo <bold>{</bold>
|
||||
3 [LAMBDA CALLS] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
|
||||
14 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{</bold>
|
||||
3 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
|
||||
6 "".f(<bold>2</bold>)
|
||||
|
||||
9 f(<bold>3</bold>)
|
||||
15 val v = <bold>it</bold>
|
||||
14 [LAMBDA CALLS] foo <bold>{</bold>
|
||||
3 [LAMBDA CALLS] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
|
||||
14 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{</bold>
|
||||
3 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
|
||||
9 f(<bold>3</bold>)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
15 val v = <bold>it</bold>
|
||||
14 [LAMBDA CALLS] foo <bold>{</bold>
|
||||
3 [LAMBDA CALLS] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
|
||||
14 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{</bold>
|
||||
3 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
|
||||
4 f("", <bold>1</bold>)
|
||||
6 "".f(<bold>2</bold>)
|
||||
9 f(<bold>3</bold>)
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
4 f("", <bold>1</bold>)
|
||||
15 val v = <bold>i</bold>
|
||||
14 foo { <bold>i</bold> ->
|
||||
14 [LAMBDA CALLS] foo <bold>{ i -></bold>
|
||||
3 [LAMBDA CALLS] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
|
||||
14 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{ i -></bold>
|
||||
3 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
|
||||
4 f("", <bold>1</bold>)
|
||||
|
||||
6 "".f(<bold>2</bold>)
|
||||
15 val v = <bold>i</bold>
|
||||
14 foo { <bold>i</bold> ->
|
||||
14 [LAMBDA CALLS] foo <bold>{ i -></bold>
|
||||
3 [LAMBDA CALLS] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
|
||||
14 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{ i -></bold>
|
||||
3 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
|
||||
6 "".f(<bold>2</bold>)
|
||||
|
||||
9 f(<bold>3</bold>)
|
||||
15 val v = <bold>i</bold>
|
||||
14 foo { <bold>i</bold> ->
|
||||
14 [LAMBDA CALLS] foo <bold>{ i -></bold>
|
||||
3 [LAMBDA CALLS] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
|
||||
14 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{ i -></bold>
|
||||
3 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
|
||||
9 f(<bold>3</bold>)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
15 val v = <bold>i</bold>
|
||||
14 foo { <bold>i</bold> ->
|
||||
14 [LAMBDA CALLS] foo <bold>{ i -></bold>
|
||||
3 [LAMBDA CALLS] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
|
||||
14 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{ i -></bold>
|
||||
3 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
|
||||
4 f("", <bold>1</bold>)
|
||||
6 "".f(<bold>2</bold>)
|
||||
9 f(<bold>3</bold>)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
4 with(<bold>"A"</bold>) {
|
||||
5 val <bold>v = this</bold>
|
||||
5 val v = <bold>this</bold>
|
||||
4 [LAMBDA CALLS] with("A") <bold>{</bold>
|
||||
9 (INLINE CALL with) [LAMBDA CALLS] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
4 [LAMBDA CALLS RECEIVER] with("A") <bold>{</bold>
|
||||
9 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
10 (INLINE CALL with) return <bold>receiver</bold>.block()
|
||||
9 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
|
||||
4 with(<bold>"A"</bold>) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
5 val <bold>v = this</bold>
|
||||
5 val v = <bold>this</bold>
|
||||
4 [LAMBDA CALLS] with("A") <bold>{</bold>
|
||||
9 (INLINE CALL with) [LAMBDA CALLS] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
4 [LAMBDA CALLS RECEIVER] with("A") <bold>{</bold>
|
||||
9 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
10 (INLINE CALL with) return <bold>receiver</bold>.block()
|
||||
9 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
|
||||
4 with(<bold>"A"</bold>) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
35 <bold>"D"</bold>.letNoInline {
|
||||
3 fun <bold>Any</bold>.extensionFun() {
|
||||
36 <bold>it</bold>.extensionFun()
|
||||
35 [LAMBDA CALLS] "D".letNoInline <bold>{</bold>
|
||||
58 [LAMBDA CALLS] fun <T, R> T.letNoInline(<bold>block: (T) -> R</bold>): R {
|
||||
35 [LAMBDA CALLS ARGUMENT #0] "D".letNoInline <bold>{</bold>
|
||||
58 [LAMBDA CALLS ARGUMENT #0] fun <T, R> T.letNoInline(<bold>block: (T) -> R</bold>): R {
|
||||
59 return block(<bold>this</bold>)
|
||||
58 fun <T, R> <bold>T</bold>.letNoInline(block: (T) -> R): R {
|
||||
35 <bold>"D"</bold>.letNoInline {
|
||||
@@ -10,8 +10,8 @@
|
||||
39 <bold>"C"</bold>.letNoInline {
|
||||
3 fun <bold>Any</bold>.extensionFun() {
|
||||
36 <bold>it</bold>.extensionFun()
|
||||
35 [LAMBDA CALLS] "D".letNoInline <bold>{</bold>
|
||||
58 [LAMBDA CALLS] fun <T, R> T.letNoInline(<bold>block: (T) -> R</bold>): R {
|
||||
35 [LAMBDA CALLS ARGUMENT #0] "D".letNoInline <bold>{</bold>
|
||||
58 [LAMBDA CALLS ARGUMENT #0] fun <T, R> T.letNoInline(<bold>block: (T) -> R</bold>): R {
|
||||
59 return block(<bold>this</bold>)
|
||||
58 fun <T, R> <bold>T</bold>.letNoInline(block: (T) -> R): R {
|
||||
39 <bold>"C"</bold>.letNoInline {
|
||||
@@ -19,32 +19,32 @@
|
||||
27 <bold>"A"</bold>.let {
|
||||
3 fun <bold>Any</bold>.extensionFun() {
|
||||
28 <bold>it</bold>.extensionFun()
|
||||
27 [LAMBDA CALLS] "A".let <bold>{</bold>
|
||||
49 (INLINE CALL let) [LAMBDA CALLS] inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
|
||||
27 [LAMBDA CALLS ARGUMENT #0] "A".let <bold>{</bold>
|
||||
49 (INLINE CALL let) [LAMBDA CALLS ARGUMENT #0] inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
|
||||
50 (INLINE CALL let) return block(<bold>this</bold>)
|
||||
49 (INLINE CALL let) inline fun <T, R> <bold>T</bold>.let(block: (T) -> R): R {
|
||||
27 <bold>"A"</bold>.let {
|
||||
|
||||
19 withNoInline(<bold>1</bold>) {
|
||||
3 fun <bold>Any</bold>.extensionFun() {
|
||||
19 [LAMBDA CALLS] withNoInline(1) <bold>{</bold>
|
||||
53 [LAMBDA CALLS] fun <T, R> withNoInline(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
19 [LAMBDA CALLS RECEIVER] withNoInline(1) <bold>{</bold>
|
||||
53 [LAMBDA CALLS RECEIVER] fun <T, R> withNoInline(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
54 val result = <bold>receiver</bold>.block()
|
||||
53 fun <T, R> withNoInline(<bold>receiver: T</bold>, block: T.() -> R): R {
|
||||
19 withNoInline(<bold>1</bold>) {
|
||||
|
||||
7 with(<bold>123</bold>) {
|
||||
3 fun <bold>Any</bold>.extensionFun() {
|
||||
7 [LAMBDA CALLS] with(123) <bold>{</bold>
|
||||
44 (INLINE CALL with) [LAMBDA CALLS] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
7 [LAMBDA CALLS RECEIVER] with(123) <bold>{</bold>
|
||||
44 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
45 (INLINE CALL with) val result = <bold>receiver</bold>.block()
|
||||
44 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
|
||||
7 with(<bold>123</bold>) {
|
||||
|
||||
23 withNoInline(<bold>2</bold>) {
|
||||
3 fun <bold>Any</bold>.extensionFun() {
|
||||
19 [LAMBDA CALLS] withNoInline(1) <bold>{</bold>
|
||||
53 [LAMBDA CALLS] fun <T, R> withNoInline(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
19 [LAMBDA CALLS RECEIVER] withNoInline(1) <bold>{</bold>
|
||||
53 [LAMBDA CALLS RECEIVER] fun <T, R> withNoInline(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
54 val result = <bold>receiver</bold>.block()
|
||||
53 fun <T, R> withNoInline(<bold>receiver: T</bold>, block: T.() -> R): R {
|
||||
23 withNoInline(<bold>2</bold>) {
|
||||
@@ -52,8 +52,8 @@
|
||||
11 with(<bold>456</bold>) {
|
||||
3 fun <bold>Any</bold>.extensionFun() {
|
||||
12 <bold>this</bold>.extensionFun()
|
||||
11 [LAMBDA CALLS] with(456) <bold>{</bold>
|
||||
44 (INLINE CALL with) [LAMBDA CALLS] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
11 [LAMBDA CALLS RECEIVER] with(456) <bold>{</bold>
|
||||
44 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
45 (INLINE CALL with) val result = <bold>receiver</bold>.block()
|
||||
44 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
|
||||
11 with(<bold>456</bold>) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[NotNull Values]
|
||||
7 with(<bold>123</bold>) {
|
||||
3 fun <bold>Any</bold>.extensionFun() {
|
||||
7 [LAMBDA CALLS] with(123) <bold>{</bold>
|
||||
44 (INLINE CALL with) [LAMBDA CALLS] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
7 [LAMBDA CALLS RECEIVER] with(123) <bold>{</bold>
|
||||
44 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
45 (INLINE CALL with) val result = <bold>receiver</bold>.block()
|
||||
44 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
|
||||
7 with(<bold>123</bold>) {
|
||||
@@ -11,15 +11,15 @@
|
||||
12 <bold>this</bold>.extensionFun()
|
||||
19 withNoInline(<bold>1</bold>) {
|
||||
3 fun <bold>Any</bold>.extensionFun() {
|
||||
19 [LAMBDA CALLS] withNoInline(1) <bold>{</bold>
|
||||
53 [LAMBDA CALLS] fun <T, R> withNoInline(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
19 [LAMBDA CALLS RECEIVER] withNoInline(1) <bold>{</bold>
|
||||
53 [LAMBDA CALLS RECEIVER] fun <T, R> withNoInline(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
54 val result = <bold>receiver</bold>.block()
|
||||
53 fun <T, R> withNoInline(<bold>receiver: T</bold>, block: T.() -> R): R {
|
||||
19 withNoInline(<bold>1</bold>) {
|
||||
23 withNoInline(<bold>2</bold>) {
|
||||
3 fun <bold>Any</bold>.extensionFun() {
|
||||
19 [LAMBDA CALLS] withNoInline(1) <bold>{</bold>
|
||||
53 [LAMBDA CALLS] fun <T, R> withNoInline(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
19 [LAMBDA CALLS RECEIVER] withNoInline(1) <bold>{</bold>
|
||||
53 [LAMBDA CALLS RECEIVER] fun <T, R> withNoInline(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
54 val result = <bold>receiver</bold>.block()
|
||||
53 fun <T, R> withNoInline(<bold>receiver: T</bold>, block: T.() -> R): R {
|
||||
23 withNoInline(<bold>2</bold>) {
|
||||
|
||||
+10
-10
@@ -1,30 +1,30 @@
|
||||
3 fun <bold>Any</bold>.extensionFun() {
|
||||
7 [LAMBDA CALLS] with(123) <bold>{</bold>
|
||||
44 (INLINE CALL with) [LAMBDA CALLS] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
7 [LAMBDA CALLS RECEIVER] with(123) <bold>{</bold>
|
||||
44 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
45 (INLINE CALL with) val result = <bold>receiver</bold>.block()
|
||||
44 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
|
||||
7 with(<bold>123</bold>) {
|
||||
12 <bold>this</bold>.extensionFun()
|
||||
11 [LAMBDA CALLS] with(456) <bold>{</bold>
|
||||
44 (INLINE CALL with) [LAMBDA CALLS] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
11 [LAMBDA CALLS RECEIVER] with(456) <bold>{</bold>
|
||||
44 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
45 (INLINE CALL with) val result = <bold>receiver</bold>.block()
|
||||
44 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
|
||||
11 with(<bold>456</bold>) {
|
||||
19 [LAMBDA CALLS] withNoInline(1) <bold>{</bold>
|
||||
53 [LAMBDA CALLS] fun <T, R> withNoInline(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
19 [LAMBDA CALLS RECEIVER] withNoInline(1) <bold>{</bold>
|
||||
53 [LAMBDA CALLS RECEIVER] fun <T, R> withNoInline(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
54 val result = <bold>receiver</bold>.block()
|
||||
53 fun <T, R> withNoInline(<bold>receiver: T</bold>, block: T.() -> R): R {
|
||||
19 withNoInline(<bold>1</bold>) {
|
||||
23 withNoInline(<bold>2</bold>) {
|
||||
28 <bold>it</bold>.extensionFun()
|
||||
27 [LAMBDA CALLS] "A".let <bold>{</bold>
|
||||
49 (INLINE CALL let) [LAMBDA CALLS] inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
|
||||
27 [LAMBDA CALLS ARGUMENT #0] "A".let <bold>{</bold>
|
||||
49 (INLINE CALL let) [LAMBDA CALLS ARGUMENT #0] inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
|
||||
50 (INLINE CALL let) return block(<bold>this</bold>)
|
||||
49 (INLINE CALL let) inline fun <T, R> <bold>T</bold>.let(block: (T) -> R): R {
|
||||
27 <bold>"A"</bold>.let {
|
||||
36 <bold>it</bold>.extensionFun()
|
||||
35 [LAMBDA CALLS] "D".letNoInline <bold>{</bold>
|
||||
58 [LAMBDA CALLS] fun <T, R> T.letNoInline(<bold>block: (T) -> R</bold>): R {
|
||||
35 [LAMBDA CALLS ARGUMENT #0] "D".letNoInline <bold>{</bold>
|
||||
58 [LAMBDA CALLS ARGUMENT #0] fun <T, R> T.letNoInline(<bold>block: (T) -> R</bold>): R {
|
||||
59 return block(<bold>this</bold>)
|
||||
58 fun <T, R> <bold>T</bold>.letNoInline(block: (T) -> R): R {
|
||||
35 <bold>"D"</bold>.letNoInline {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
4 f(<bold>1</bold>)
|
||||
9 val v = <bold>it</bold>
|
||||
8 [LAMBDA CALLS] foo <bold>{</bold>
|
||||
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Unit</bold>) {
|
||||
8 [LAMBDA CALLS ARGUMENT #0] foo <bold>{</bold>
|
||||
3 [LAMBDA CALLS ARGUMENT #0] fun foo(<bold>f: (Int) -> Unit</bold>) {
|
||||
4 f(<bold>1</bold>)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
9 val v = <bold>it</bold>
|
||||
8 [LAMBDA CALLS] foo <bold>{</bold>
|
||||
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Unit</bold>) {
|
||||
8 [LAMBDA CALLS ARGUMENT #0] foo <bold>{</bold>
|
||||
3 [LAMBDA CALLS ARGUMENT #0] fun foo(<bold>f: (Int) -> Unit</bold>) {
|
||||
4 f(<bold>1</bold>)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
4 f(<bold>1</bold>)
|
||||
9 val v = <bold>value</bold>
|
||||
8 foo { <bold>value</bold> ->
|
||||
8 [LAMBDA CALLS] foo <bold>{ value -></bold>
|
||||
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Unit</bold>) {
|
||||
8 [LAMBDA CALLS ARGUMENT #0] foo <bold>{ value -></bold>
|
||||
3 [LAMBDA CALLS ARGUMENT #0] fun foo(<bold>f: (Int) -> Unit</bold>) {
|
||||
4 f(<bold>1</bold>)
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
9 val v = <bold>value</bold>
|
||||
8 foo { <bold>value</bold> ->
|
||||
8 [LAMBDA CALLS] foo <bold>{ value -></bold>
|
||||
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Unit</bold>) {
|
||||
8 [LAMBDA CALLS ARGUMENT #0] foo <bold>{ value -></bold>
|
||||
3 [LAMBDA CALLS ARGUMENT #0] fun foo(<bold>f: (Int) -> Unit</bold>) {
|
||||
4 f(<bold>1</bold>)
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@
|
||||
8 [LAMBDA IN] val x = foo <bold>{ it }</bold>
|
||||
8 val x = foo <bold>{ it }</bold>
|
||||
8 val x = foo { <bold>it</bold> }
|
||||
8 [LAMBDA CALLS] val x = foo <bold>{ it }</bold>
|
||||
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Int</bold>): Int {
|
||||
8 [LAMBDA CALLS ARGUMENT #0] val x = foo <bold>{ it }</bold>
|
||||
3 [LAMBDA CALLS ARGUMENT #0] fun foo(<bold>f: (Int) -> Int</bold>): Int {
|
||||
4 return f(<bold>1</bold>)
|
||||
|
||||
|
||||
+2
-2
@@ -7,6 +7,6 @@
|
||||
8 [LAMBDA IN] val x = foo <bold>{ it }</bold>
|
||||
8 val x = foo <bold>{ it }</bold>
|
||||
8 val x = foo { <bold>it</bold> }
|
||||
8 [LAMBDA CALLS] val x = foo <bold>{ it }</bold>
|
||||
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Int</bold>): Int {
|
||||
8 [LAMBDA CALLS ARGUMENT #0] val x = foo <bold>{ it }</bold>
|
||||
3 [LAMBDA CALLS ARGUMENT #0] fun foo(<bold>f: (Int) -> Int</bold>): Int {
|
||||
4 return f(<bold>1</bold>)
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
9 [LAMBDA IN] val y = foo <bold>{ it }</bold>
|
||||
9 val y = foo <bold>{ it }</bold>
|
||||
9 val y = foo { <bold>it</bold> }
|
||||
9 [LAMBDA CALLS] val y = foo <bold>{ it }</bold>
|
||||
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Int</bold>): Int {
|
||||
4 [LAMBDA CALLS] val x = <bold>f</bold>
|
||||
4 [LAMBDA CALLS] val <bold>x = f</bold>
|
||||
9 [LAMBDA CALLS ARGUMENT #0] val y = foo <bold>{ it }</bold>
|
||||
3 [LAMBDA CALLS ARGUMENT #0] fun foo(<bold>f: (Int) -> Int</bold>): Int {
|
||||
4 [LAMBDA CALLS ARGUMENT #0] val x = <bold>f</bold>
|
||||
4 [LAMBDA CALLS ARGUMENT #0] val <bold>x = f</bold>
|
||||
5 return x(<bold>1</bold>)
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
9 [LAMBDA IN] val y = foo <bold>{ it }</bold>
|
||||
9 val y = foo <bold>{ it }</bold>
|
||||
9 val y = foo { <bold>it</bold> }
|
||||
9 [LAMBDA CALLS] val y = foo <bold>{ it }</bold>
|
||||
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Int</bold>): Int {
|
||||
4 [LAMBDA CALLS] val x = <bold>f</bold>
|
||||
4 [LAMBDA CALLS] val <bold>x = f</bold>
|
||||
9 [LAMBDA CALLS ARGUMENT #0] val y = foo <bold>{ it }</bold>
|
||||
3 [LAMBDA CALLS ARGUMENT #0] fun foo(<bold>f: (Int) -> Int</bold>): Int {
|
||||
4 [LAMBDA CALLS ARGUMENT #0] val x = <bold>f</bold>
|
||||
4 [LAMBDA CALLS ARGUMENT #0] val <bold>x = f</bold>
|
||||
5 return x(<bold>1</bold>)
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
5 fun bar(a: Int): Int = foo(a) <bold>{ if (it > 0) it else return 0 }</bold>
|
||||
5 fun bar(a: Int): Int = foo(a) { <bold>if (it > 0) it else return 0</bold> }
|
||||
5 fun bar(a: Int): Int = foo(a) { if (it > 0) <bold>it</bold> else return 0 }
|
||||
5 [LAMBDA CALLS] fun bar(a: Int): Int = foo(a) <bold>{ if (it > 0) it else return 0 }</bold>
|
||||
3 (INLINE CALL foo) [LAMBDA CALLS] inline fun foo(a: Int, <bold>f: (Int) -> Int</bold>) = f(a)
|
||||
5 [LAMBDA CALLS ARGUMENT #0] fun bar(a: Int): Int = foo(a) <bold>{ if (it > 0) it else return 0 }</bold>
|
||||
3 (INLINE CALL foo) [LAMBDA CALLS ARGUMENT #0] inline fun foo(a: Int, <bold>f: (Int) -> Int</bold>) = f(a)
|
||||
3 (INLINE CALL foo) inline fun foo(a: Int, f: (Int) -> Int) = f(<bold>a</bold>)
|
||||
3 (INLINE CALL foo) inline fun foo(<bold>a: Int</bold>, f: (Int) -> Int) = f(a)
|
||||
5 fun bar(a: Int): Int = foo(<bold>a</bold>) { if (it > 0) it else return 0 }
|
||||
|
||||
+2
-2
@@ -8,8 +8,8 @@
|
||||
5 fun bar(a: Int): Int = foo(a) <bold>{ if (it > 0) it else return 0 }</bold>
|
||||
5 fun bar(a: Int): Int = foo(a) { <bold>if (it > 0) it else return 0</bold> }
|
||||
5 fun bar(a: Int): Int = foo(a) { if (it > 0) <bold>it</bold> else return 0 }
|
||||
5 [LAMBDA CALLS] fun bar(a: Int): Int = foo(a) <bold>{ if (it > 0) it else return 0 }</bold>
|
||||
3 (INLINE CALL foo) [LAMBDA CALLS] inline fun foo(a: Int, <bold>f: (Int) -> Int</bold>) = f(a)
|
||||
5 [LAMBDA CALLS ARGUMENT #0] fun bar(a: Int): Int = foo(a) <bold>{ if (it > 0) it else return 0 }</bold>
|
||||
3 (INLINE CALL foo) [LAMBDA CALLS ARGUMENT #0] inline fun foo(a: Int, <bold>f: (Int) -> Int</bold>) = f(a)
|
||||
3 (INLINE CALL foo) inline fun foo(a: Int, f: (Int) -> Int) = f(<bold>a</bold>)
|
||||
3 (INLINE CALL foo) inline fun foo(<bold>a: Int</bold>, f: (Int) -> Int) = f(a)
|
||||
5 fun bar(a: Int): Int = foo(<bold>a</bold>) { if (it > 0) it else return 0 }
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
18 with(<bold>123</bold>) {
|
||||
8 fun <bold>Any</bold>.extensionFun() {
|
||||
18 [LAMBDA CALLS] with(123) <bold>{</bold>
|
||||
27 (INLINE CALL with) [LAMBDA CALLS] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
18 [LAMBDA CALLS RECEIVER] with(123) <bold>{</bold>
|
||||
27 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
28 (INLINE CALL with) return <bold>receiver</bold>.block()
|
||||
27 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
|
||||
18 with(<bold>123</bold>) {
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
14 <bold>1</bold>.extensionFun()
|
||||
18 with(<bold>123</bold>) {
|
||||
8 fun <bold>Any</bold>.extensionFun() {
|
||||
18 [LAMBDA CALLS] with(123) <bold>{</bold>
|
||||
27 (INLINE CALL with) [LAMBDA CALLS] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
18 [LAMBDA CALLS RECEIVER] with(123) <bold>{</bold>
|
||||
27 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
28 (INLINE CALL with) return <bold>receiver</bold>.block()
|
||||
27 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
|
||||
18 with(<bold>123</bold>) {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
24 <bold>"A"</bold>.foo()
|
||||
12 <bold>""</bold>.extensionFun()
|
||||
14 <bold>1</bold>.extensionFun()
|
||||
18 [LAMBDA CALLS] with(123) <bold>{</bold>
|
||||
27 (INLINE CALL with) [LAMBDA CALLS] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
18 [LAMBDA CALLS RECEIVER] with(123) <bold>{</bold>
|
||||
27 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
28 (INLINE CALL with) return <bold>receiver</bold>.block()
|
||||
27 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
|
||||
18 with(<bold>123</bold>) {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
4 val v1 = f(<bold>p</bold>, { this })
|
||||
11 fun f(<bold>receiver: String</bold>, lambda: String.() -> String): String {
|
||||
12 return lambda.invoke(<bold>receiver</bold>)
|
||||
12 [LAMBDA RECEIVER IN] return <bold>lambda</bold>.invoke(receiver)
|
||||
11 [LAMBDA RECEIVER IN] fun f(receiver: String, <bold>lambda: String.() -> String</bold>): String {
|
||||
4 [LAMBDA RECEIVER IN] val v1 = f(p, <bold>{ this }</bold>)
|
||||
12 [LAMBDA RECEIVER] return <bold>lambda</bold>.invoke(receiver)
|
||||
11 [LAMBDA RECEIVER] fun f(receiver: String, <bold>lambda: String.() -> String</bold>): String {
|
||||
4 [LAMBDA RECEIVER] val v1 = f(p, <bold>{ this }</bold>)
|
||||
4 val v1 = f(p, { <bold>this</bold> })
|
||||
4 val v1 = f(p, <bold>{ this }</bold>)
|
||||
4 [LAMBDA CALLS] val v1 = f(p, <bold>{ this }</bold>)
|
||||
@@ -17,9 +17,9 @@
|
||||
6 val v2 = g("a", "b", <bold>p</bold>, { p1, p2 -> p2 })
|
||||
15 fun g(a: String, b: String, <bold>c: String</bold>, lambda: String.(String, String) -> String): String {
|
||||
16 return lambda.invoke(a, b, <bold>c</bold>)
|
||||
16 [LAMBDA ARGUMENT IN] return <bold>lambda</bold>.invoke(a, b, c)
|
||||
15 [LAMBDA ARGUMENT IN] fun g(a: String, b: String, c: String, <bold>lambda: String.(String, String) -> String</bold>): String {
|
||||
6 [LAMBDA ARGUMENT IN] val v2 = g("a", "b", p, <bold>{ p1, p2 -> p2 }</bold>)
|
||||
16 [LAMBDA PARAMETER #1] return <bold>lambda</bold>.invoke(a, b, c)
|
||||
15 [LAMBDA PARAMETER #1] fun g(a: String, b: String, c: String, <bold>lambda: String.(String, String) -> String</bold>): String {
|
||||
6 [LAMBDA PARAMETER #1] val v2 = g("a", "b", p, <bold>{ p1, p2 -> p2 }</bold>)
|
||||
6 val v2 = g("a", "b", p, { p1, <bold>p2</bold> -> p2 })
|
||||
6 val v2 = g("a", "b", p, { p1, p2 -> <bold>p2</bold> })
|
||||
6 val v2 = g("a", "b", p, <bold>{ p1, p2 -> p2 }</bold>)
|
||||
@@ -33,9 +33,9 @@
|
||||
8 val v3 = inlineF(<bold>p</bold>, { this })
|
||||
19 (INLINE CALL inlineF) inline fun inlineF(<bold>receiver: String</bold>, lambda: String.() -> String): String {
|
||||
20 (INLINE CALL inlineF) return lambda.invoke(<bold>receiver</bold>)
|
||||
20 (INLINE CALL inlineF) [LAMBDA RECEIVER IN] return <bold>lambda</bold>.invoke(receiver)
|
||||
19 (INLINE CALL inlineF) [LAMBDA RECEIVER IN] inline fun inlineF(receiver: String, <bold>lambda: String.() -> String</bold>): String {
|
||||
8 [LAMBDA RECEIVER IN] val v3 = inlineF(p, <bold>{ this }</bold>)
|
||||
20 (INLINE CALL inlineF) [LAMBDA RECEIVER] return <bold>lambda</bold>.invoke(receiver)
|
||||
19 (INLINE CALL inlineF) [LAMBDA RECEIVER] inline fun inlineF(receiver: String, <bold>lambda: String.() -> String</bold>): String {
|
||||
8 [LAMBDA RECEIVER] val v3 = inlineF(p, <bold>{ this }</bold>)
|
||||
8 val v3 = inlineF(p, { <bold>this</bold> })
|
||||
8 val v3 = inlineF(p, <bold>{ this }</bold>)
|
||||
8 [LAMBDA CALLS] val v3 = inlineF(p, <bold>{ this }</bold>)
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
4 val v1 = bar(<bold>p</bold>) { { this } }
|
||||
7 (INLINE CALL bar) inline fun bar(<bold>x: String</bold>, lambda: () -> String.() -> String): String {
|
||||
8 (INLINE CALL bar) return lambda()(<bold>x</bold>)
|
||||
8 (INLINE CALL bar) [LAMBDA RECEIVER IN] return <bold>lambda()</bold>(x)
|
||||
8 (INLINE CALL bar) [LAMBDA IN] [LAMBDA RECEIVER IN] return <bold>lambda</bold>()(x)
|
||||
7 (INLINE CALL bar) [LAMBDA IN] [LAMBDA RECEIVER IN] inline fun bar(x: String, <bold>lambda: () -> String.() -> String</bold>): String {
|
||||
4 [LAMBDA IN] [LAMBDA RECEIVER IN] val v1 = bar(p) <bold>{ { this } }</bold>
|
||||
4 [LAMBDA RECEIVER IN] val v1 = bar(p) <bold>{ { this } }</bold>
|
||||
4 [LAMBDA RECEIVER IN] val v1 = bar(p) { <bold>{ this }</bold> }
|
||||
8 (INLINE CALL bar) [LAMBDA RECEIVER] return <bold>lambda()</bold>(x)
|
||||
8 (INLINE CALL bar) [LAMBDA IN] [LAMBDA RECEIVER] return <bold>lambda</bold>()(x)
|
||||
7 (INLINE CALL bar) [LAMBDA IN] [LAMBDA RECEIVER] inline fun bar(x: String, <bold>lambda: () -> String.() -> String</bold>): String {
|
||||
4 [LAMBDA IN] [LAMBDA RECEIVER] val v1 = bar(p) <bold>{ { this } }</bold>
|
||||
4 [LAMBDA RECEIVER] val v1 = bar(p) <bold>{ { this } }</bold>
|
||||
4 [LAMBDA RECEIVER] val v1 = bar(p) { <bold>{ this }</bold> }
|
||||
4 val v1 = bar(p) { { <bold>this</bold> } }
|
||||
4 val v1 = bar(p) { <bold>{ this }</bold> }
|
||||
4 [LAMBDA CALLS] val v1 = bar(p) { <bold>{ this }</bold> }
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
4 val v = bar(<bold>p</bold>) { this }
|
||||
7 fun <T, R> bar(<bold>receiver: T</bold>, block: T.() -> R): R {
|
||||
9 return <bold>receiver</bold>.b()
|
||||
8 [LAMBDA RECEIVER IN] val <bold>b = block</bold>
|
||||
8 [LAMBDA RECEIVER IN] val b = <bold>block</bold>
|
||||
7 [LAMBDA RECEIVER IN] fun <T, R> bar(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
4 [LAMBDA RECEIVER IN] val v = bar(p) <bold>{ this }</bold>
|
||||
8 [LAMBDA RECEIVER] val <bold>b = block</bold>
|
||||
8 [LAMBDA RECEIVER] val b = <bold>block</bold>
|
||||
7 [LAMBDA RECEIVER] fun <T, R> bar(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
4 [LAMBDA RECEIVER] val v = bar(p) <bold>{ this }</bold>
|
||||
4 val v = bar(p) { <bold>this</bold> }
|
||||
4 val v = bar(p) <bold>{ this }</bold>
|
||||
4 [LAMBDA CALLS] val v = bar(p) <bold>{ this }</bold>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
4 val v = f({ p1, p2 -> p2 }, <bold>p</bold>)
|
||||
7 fun f(lambda: (String, String) -> String, <bold>receiver: String</bold>): String {
|
||||
8 return lambda("a", <bold>receiver</bold>)
|
||||
7 [LAMBDA ARGUMENT IN] fun f(<bold>lambda: (String, String) -> String</bold>, receiver: String): String {
|
||||
4 [LAMBDA ARGUMENT IN] val v = f(<bold>{ p1, p2 -> p2 }</bold>, p)
|
||||
7 [LAMBDA PARAMETER #1] fun f(<bold>lambda: (String, String) -> String</bold>, receiver: String): String {
|
||||
4 [LAMBDA PARAMETER #1] val v = f(<bold>{ p1, p2 -> p2 }</bold>, p)
|
||||
4 val v = f({ p1, <bold>p2</bold> -> p2 }, p)
|
||||
4 val v = f({ p1, p2 -> <bold>p2</bold> }, p)
|
||||
4 val v = f(<bold>{ p1, p2 -> p2 }</bold>, p)
|
||||
|
||||
+8
-8
@@ -2,8 +2,8 @@
|
||||
4 val v1 = <bold>p</bold>.let { value -> bar(value) }
|
||||
19 (INLINE CALL let) inline fun <T, R> <bold>T</bold>.let(block: (T) -> R): R {
|
||||
20 (INLINE CALL let) return block(<bold>this</bold>)
|
||||
19 (INLINE CALL let) [LAMBDA ARGUMENT IN] inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
|
||||
4 [LAMBDA ARGUMENT IN] val v1 = p.let <bold>{ value -> bar(value) }</bold>
|
||||
19 (INLINE CALL let) [LAMBDA PARAMETER #0] inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
|
||||
4 [LAMBDA PARAMETER #0] val v1 = p.let <bold>{ value -> bar(value) }</bold>
|
||||
4 val v1 = p.let { <bold>value</bold> -> bar(value) }
|
||||
4 val v1 = p.let { value -> bar(<bold>value</bold>) }
|
||||
16 fun bar(<bold>s: String</bold>) = s
|
||||
@@ -19,8 +19,8 @@
|
||||
6 val v2 = <bold>p</bold>.let { it }
|
||||
19 (INLINE CALL let) inline fun <T, R> <bold>T</bold>.let(block: (T) -> R): R {
|
||||
20 (INLINE CALL let) return block(<bold>this</bold>)
|
||||
19 (INLINE CALL let) [LAMBDA ARGUMENT IN] inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
|
||||
6 [LAMBDA ARGUMENT IN] val v2 = p.let <bold>{ it }</bold>
|
||||
19 (INLINE CALL let) [LAMBDA PARAMETER #0] inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
|
||||
6 [LAMBDA PARAMETER #0] val v2 = p.let <bold>{ it }</bold>
|
||||
6 val v2 = p.let { <bold>it</bold> }
|
||||
6 val v2 = p.let <bold>{ it }</bold>
|
||||
6 [LAMBDA CALLS] val v2 = p.let <bold>{ it }</bold>
|
||||
@@ -31,13 +31,13 @@
|
||||
8 val v3 = <bold>p</bold>.let {
|
||||
19 (INLINE CALL let) inline fun <T, R> <bold>T</bold>.let(block: (T) -> R): R {
|
||||
20 (INLINE CALL let) return block(<bold>this</bold>)
|
||||
19 (INLINE CALL let) [LAMBDA ARGUMENT IN] inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
|
||||
8 [LAMBDA ARGUMENT IN] val v3 = p.let <bold>{</bold>
|
||||
19 (INLINE CALL let) [LAMBDA PARAMETER #0] inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
|
||||
8 [LAMBDA PARAMETER #0] val v3 = p.let <bold>{</bold>
|
||||
13 val v4 = <bold>p</bold>.let(::zoo)
|
||||
19 (INLINE CALL let) inline fun <T, R> <bold>T</bold>.let(block: (T) -> R): R {
|
||||
20 (INLINE CALL let) return block(<bold>this</bold>)
|
||||
19 (INLINE CALL let) [LAMBDA ARGUMENT IN] inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
|
||||
13 [LAMBDA ARGUMENT IN] val v4 = p.let(<bold>::zoo</bold>)
|
||||
19 (INLINE CALL let) [LAMBDA PARAMETER #0] inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
|
||||
13 [LAMBDA PARAMETER #0] val v4 = p.let(<bold>::zoo</bold>)
|
||||
17 fun zoo(<bold>s: String</bold>) = s
|
||||
17 fun zoo(s: String) = <bold>s</bold>
|
||||
17 fun <bold>zoo(s: String) = s</bold>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
4 val v1 = <bold>p</bold>.let { value -> bar(value) }
|
||||
16 fun <T, R> <bold>T</bold>.let(block: (T) -> R): R {
|
||||
17 return block(<bold>this</bold>)
|
||||
16 [LAMBDA ARGUMENT IN] fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
|
||||
4 [LAMBDA ARGUMENT IN] val v1 = p.let <bold>{ value -> bar(value) }</bold>
|
||||
16 [LAMBDA PARAMETER #0] fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
|
||||
4 [LAMBDA PARAMETER #0] val v1 = p.let <bold>{ value -> bar(value) }</bold>
|
||||
4 val v1 = p.let { <bold>value</bold> -> bar(value) }
|
||||
4 val v1 = p.let { value -> bar(<bold>value</bold>) }
|
||||
14 fun bar(<bold>s: String</bold>) = s
|
||||
@@ -21,12 +21,12 @@
|
||||
6 val <bold>v2 = p.let { it }</bold>
|
||||
8 val v3 = p.<bold>let {</bold>
|
||||
8 val <bold>v3 = p.let {</bold>
|
||||
6 [LAMBDA ARGUMENT IN] val v2 = p.let <bold>{ it }</bold>
|
||||
6 [LAMBDA PARAMETER #0] val v2 = p.let <bold>{ it }</bold>
|
||||
6 val v2 = p.let { <bold>it</bold> }
|
||||
6 val v2 = p.let <bold>{ it }</bold>
|
||||
6 [LAMBDA CALLS] val v2 = p.let <bold>{ it }</bold>
|
||||
16 [LAMBDA CALLS] DUPLICATE: fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
|
||||
8 [LAMBDA ARGUMENT IN] val v3 = p.let <bold>{</bold>
|
||||
8 [LAMBDA PARAMETER #0] val v3 = p.let <bold>{</bold>
|
||||
6 val v2 = <bold>p</bold>.let { it }
|
||||
16 DUPLICATE: fun <T, R> <bold>T</bold>.let(block: (T) -> R): R {
|
||||
8 val v3 = <bold>p</bold>.let {
|
||||
|
||||
+4
-4
@@ -2,10 +2,10 @@
|
||||
4 val v = bar(<bold>p</bold>, true, { this })
|
||||
7 fun bar(<bold>receiver: String</bold>, b: Boolean, lambda: (String.() -> String)?): String {
|
||||
8 return if (b) lambda!!.invoke(<bold>receiver</bold>) else ""
|
||||
8 [LAMBDA RECEIVER IN] return if (b) <bold>lambda!!</bold>.invoke(receiver) else ""
|
||||
8 [LAMBDA RECEIVER IN] return if (b) <bold>lambda</bold>!!.invoke(receiver) else ""
|
||||
7 [LAMBDA RECEIVER IN] fun bar(receiver: String, b: Boolean, <bold>lambda: (String.() -> String)?</bold>): String {
|
||||
4 [LAMBDA RECEIVER IN] val v = bar(p, true, <bold>{ this }</bold>)
|
||||
8 [LAMBDA RECEIVER] return if (b) <bold>lambda!!</bold>.invoke(receiver) else ""
|
||||
8 [LAMBDA RECEIVER] return if (b) <bold>lambda</bold>!!.invoke(receiver) else ""
|
||||
7 [LAMBDA RECEIVER] fun bar(receiver: String, b: Boolean, <bold>lambda: (String.() -> String)?</bold>): String {
|
||||
4 [LAMBDA RECEIVER] val v = bar(p, true, <bold>{ this }</bold>)
|
||||
4 val v = bar(p, true, { <bold>this</bold> })
|
||||
4 val v = bar(p, true, <bold>{ this }</bold>)
|
||||
4 [LAMBDA CALLS] val v = bar(p, true, <bold>{ this }</bold>)
|
||||
|
||||
+8
-8
@@ -2,8 +2,8 @@
|
||||
4 val v1 = with(<bold>p</bold>) { this }
|
||||
16 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
|
||||
17 (INLINE CALL with) return <bold>receiver</bold>.block()
|
||||
16 (INLINE CALL with) [LAMBDA RECEIVER IN] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
4 [LAMBDA RECEIVER IN] val v1 = with(p) <bold>{ this }</bold>
|
||||
16 (INLINE CALL with) [LAMBDA RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
4 [LAMBDA RECEIVER] val v1 = with(p) <bold>{ this }</bold>
|
||||
4 val v1 = with(p) { <bold>this</bold> }
|
||||
4 val v1 = with(p) <bold>{ this }</bold>
|
||||
4 [LAMBDA CALLS] val v1 = with(p) <bold>{ this }</bold>
|
||||
@@ -14,8 +14,8 @@
|
||||
6 val v2 = with(<bold>p</bold>) { bar(this) }
|
||||
16 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
|
||||
17 (INLINE CALL with) return <bold>receiver</bold>.block()
|
||||
16 (INLINE CALL with) [LAMBDA RECEIVER IN] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
6 [LAMBDA RECEIVER IN] val v2 = with(p) <bold>{ bar(this) }</bold>
|
||||
16 (INLINE CALL with) [LAMBDA RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
6 [LAMBDA RECEIVER] val v2 = with(p) <bold>{ bar(this) }</bold>
|
||||
6 val v2 = with(p) { bar(<bold>this</bold>) }
|
||||
13 fun bar(<bold>s: String</bold>) = s
|
||||
13 fun bar(s: String) = <bold>s</bold>
|
||||
@@ -30,13 +30,13 @@
|
||||
8 val v3 = with(<bold>p</bold>) { this@foo }
|
||||
16 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
|
||||
17 (INLINE CALL with) return <bold>receiver</bold>.block()
|
||||
16 (INLINE CALL with) [LAMBDA RECEIVER IN] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
8 [LAMBDA RECEIVER IN] val v3 = with(p) <bold>{ this@foo }</bold>
|
||||
16 (INLINE CALL with) [LAMBDA RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
8 [LAMBDA RECEIVER] val v3 = with(p) <bold>{ this@foo }</bold>
|
||||
10 val v4 = with(<bold>p</bold>, ::zoo)
|
||||
16 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
|
||||
17 (INLINE CALL with) return <bold>receiver</bold>.block()
|
||||
16 (INLINE CALL with) [LAMBDA RECEIVER IN] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
10 [LAMBDA RECEIVER IN] val v4 = with(p, <bold>::zoo</bold>)
|
||||
16 (INLINE CALL with) [LAMBDA RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
10 [LAMBDA RECEIVER] val v4 = with(p, <bold>::zoo</bold>)
|
||||
14 fun zoo(<bold>s: String</bold>) = s
|
||||
14 fun zoo(s: String) = <bold>s</bold>
|
||||
14 fun <bold>zoo(s: String) = s</bold>
|
||||
|
||||
Reference in New Issue
Block a user