From 36ad065792a3a8fbbb244edcb43d60e02ca410fb Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Wed, 30 Oct 2019 18:04:15 +0300 Subject: [PATCH] [FIR] Fix testdata broken after d2b895d8 --- .../resolve/smartcasts/implicitReceivers.dot | 12 ++++++------ .../lambdaInDataClassDefaultParameter.fir.txt | 2 +- .../declarations/parameters/lambdas.fir.txt | 2 +- .../ir/irText/lambdas/extensionLambda.fir.txt | 5 ++--- .../lambdas/multipleImplicitReceivers.fir.txt | 15 ++++++--------- .../testData/ir/irText/stubs/builtinMap.fir.txt | 5 ++--- 6 files changed, 18 insertions(+), 23 deletions(-) diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceivers.dot b/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceivers.dot index e58cf388020..2da8b477012 100644 --- a/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceivers.dot +++ b/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceivers.dot @@ -237,7 +237,7 @@ digraph implicitReceivers_kt { } 85 [label="Exit function anonymousFunction"]; } - 86 [label="Function call: R|kotlin/with|(R|/c|, = wc@fun R|kotlin/Any|.(it: R|kotlin/Any|): R|kotlin/Unit| { + 86 [label="Function call: R|kotlin/with|(R|/c|, = wc@fun R|kotlin/Any|.(): R|kotlin/Unit| { (this@R|special/anonymous| as R|A|) this@R|special/anonymous|.R|/A.foo|() this@R|/A|.R|/A.foo|() @@ -250,8 +250,8 @@ digraph implicitReceivers_kt { } 91 [label="Exit function anonymousFunction"]; } - 92 [label="Function call: R|kotlin/with|(R|/b|, = wb@fun R|kotlin/Any|.(it: R|kotlin/Any|): R|kotlin/Unit| { - R|kotlin/with|(R|/c|, = wc@fun R|kotlin/Any|.(it: R|kotlin/Any|): R|kotlin/Unit| { + 92 [label="Function call: R|kotlin/with|(R|/b|, = wb@fun R|kotlin/Any|.(): R|kotlin/Unit| { + R|kotlin/with|(R|/c|, = wc@fun R|kotlin/Any|.(): R|kotlin/Unit| { (this@R|special/anonymous| as R|A|) this@R|special/anonymous|.R|/A.foo|() this@R|/A|.R|/A.foo|() @@ -265,9 +265,9 @@ digraph implicitReceivers_kt { } 94 [label="Exit function anonymousFunction"]; } - 95 [label="Function call: R|kotlin/with|(R|/a|, = wa@fun R|kotlin/Any|.(it: R|kotlin/Any|): R|kotlin/Unit| { - R|kotlin/with|(R|/b|, = wb@fun R|kotlin/Any|.(it: R|kotlin/Any|): R|kotlin/Unit| { - R|kotlin/with|(R|/c|, = wc@fun R|kotlin/Any|.(it: R|kotlin/Any|): R|kotlin/Unit| { + 95 [label="Function call: R|kotlin/with|(R|/a|, = wa@fun R|kotlin/Any|.(): R|kotlin/Unit| { + R|kotlin/with|(R|/b|, = wb@fun R|kotlin/Any|.(): R|kotlin/Unit| { + R|kotlin/with|(R|/c|, = wc@fun R|kotlin/Any|.(): R|kotlin/Unit| { (this@R|special/anonymous| as R|A|) this@R|special/anonymous|.R|/A.foo|() this@R|/A|.R|/A.foo|() diff --git a/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.fir.txt b/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.fir.txt index 463b898f73b..79ee79ffc31 100644 --- a/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.fir.txt +++ b/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.fir.txt @@ -4,7 +4,7 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt CONSTRUCTOR visibility:public <> (runA:kotlin.Function2<.A, kotlin.String, kotlin.Unit>) returnType:.A [primary] VALUE_PARAMETER name:runA index:0 type:kotlin.Function2<.A, kotlin.String, kotlin.Unit> EXPRESSION_BODY - FUN_EXPR type=kotlin.Function0 origin=LAMBDA + FUN_EXPR type=kotlin.Function1<.A, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit diff --git a/compiler/testData/ir/irText/declarations/parameters/lambdas.fir.txt b/compiler/testData/ir/irText/declarations/parameters/lambdas.fir.txt index 54112a2a5f9..24157591061 100644 --- a/compiler/testData/ir/irText/declarations/parameters/lambdas.fir.txt +++ b/compiler/testData/ir/irText/declarations/parameters/lambdas.fir.txt @@ -15,7 +15,7 @@ FILE fqName: fileName:/lambdas.kt PROPERTY name:test2 visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Function2 visibility:private [final,static] EXPRESSION_BODY - FUN_EXPR type=kotlin.Function0 origin=LAMBDA + FUN_EXPR type=kotlin.Function1 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:IrErrorType BLOCK_BODY ERROR_CALL 'Unresolved reference: #' type=IrErrorType diff --git a/compiler/testData/ir/irText/lambdas/extensionLambda.fir.txt b/compiler/testData/ir/irText/lambdas/extensionLambda.fir.txt index 35fa69ee6d8..88ad2a4b965 100644 --- a/compiler/testData/ir/irText/lambdas/extensionLambda.fir.txt +++ b/compiler/testData/ir/irText/lambdas/extensionLambda.fir.txt @@ -4,9 +4,8 @@ FILE fqName: fileName:/extensionLambda.kt RETURN type=kotlin.Nothing from='public final fun test1 (): kotlin.Int declared in ' CALL 'public final fun run (block: kotlin.Function1, R of >): R of [inline] declared in kotlin' type=kotlin.Int origin=null $receiver: CONST String type=kotlin.String value="42" - block: FUN_EXPR type=kotlin.Function2 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.String) returnType:kotlin.Int - VALUE_PARAMETER name:it index:0 type:kotlin.String + block: FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Int BLOCK_BODY CALL 'public open fun (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null $this: GET_VAR ': kotlin.String declared in kotlin.String' type=kotlin.String origin=null diff --git a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.fir.txt b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.fir.txt index 62a9c2ad558..8d19f46f777 100644 --- a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.fir.txt +++ b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.fir.txt @@ -86,21 +86,18 @@ FILE fqName: fileName:/multipleImplicitReceivers.kt BLOCK_BODY CALL 'public final fun with (receiver: T of , block: kotlin.Function1, R of >): R of [inline] declared in kotlin' type=kotlin.Int origin=null receiver: GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.A - block: FUN_EXPR type=kotlin.Function2<.A, .A, kotlin.Unit> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:.A) returnType:kotlin.Unit - VALUE_PARAMETER name:it index:0 type:.A + block: FUN_EXPR type=kotlin.Function1<.A, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun with (receiver: T of , block: kotlin.Function1, R of >): R of [inline] declared in kotlin' type=kotlin.Int origin=null receiver: GET_VAR 'fooImpl: .IFoo declared in .test' type=.IFoo origin=null - block: FUN_EXPR type=kotlin.Function2<.IFoo, .IFoo, kotlin.Unit> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:.IFoo) returnType:kotlin.Unit - VALUE_PARAMETER name:it index:0 type:.IFoo + block: FUN_EXPR type=kotlin.Function1<.IFoo, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun with (receiver: T of , block: kotlin.Function1, R of >): R of [inline] declared in kotlin' type=kotlin.Int origin=null receiver: GET_VAR 'invokeImpl: .IInvoke declared in .test' type=.IInvoke origin=null - block: FUN_EXPR type=kotlin.Function2<.IInvoke, .IInvoke, kotlin.Unit> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:.IInvoke) returnType:kotlin.Unit - VALUE_PARAMETER name:it index:0 type:.IInvoke + block: FUN_EXPR type=kotlin.Function1<.IInvoke, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public open fun invoke (): kotlin.Int declared in .IInvoke' type=kotlin.Int origin=null $this: GET_VAR ': .IInvoke declared in .IInvoke' type=.IInvoke origin=null diff --git a/compiler/testData/ir/irText/stubs/builtinMap.fir.txt b/compiler/testData/ir/irText/stubs/builtinMap.fir.txt index 5fa2ccbdbe5..ed9674160a1 100644 --- a/compiler/testData/ir/irText/stubs/builtinMap.fir.txt +++ b/compiler/testData/ir/irText/stubs/builtinMap.fir.txt @@ -19,9 +19,8 @@ FILE fqName: fileName:/builtinMap.kt : : : GET_VAR ': kotlin.collections.Map.plus, V1 of .plus> declared in .plus' type=kotlin.collections.Map.plus, V1 of .plus> origin=null - block: FUN_EXPR type=kotlin.Function2.plus, V1 of .plus>, java.util.LinkedHashMap.plus, V1 of .plus>, kotlin.Unit> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:java.util.LinkedHashMap.plus, V1 of .plus>) returnType:kotlin.Unit - VALUE_PARAMETER name:it index:0 type:java.util.LinkedHashMap.plus, V1 of .plus> + block: FUN_EXPR type=kotlin.Function1.plus, V1 of .plus>, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public open fun put (: K1 of .plus, : V1 of .plus): V1 of .plus declared in java.util.HashMap' type=V1 of .plus origin=null $this: GET_VAR ': java.util.HashMap declared in java.util.HashMap' type=java.util.HashMap<*, *> origin=null