[IR] Don't print flags in declaration references in irText tests
This doesn't reduce the quality of tests, because the flags are still printed for declarations themselves. We only omit them in references. However, this makes the tests more compatible with non-JVM backends (see KT-58605), because flags of referenced stdlib declarations may differ among target platforms.
This commit is contained in:
committed by
Space Team
parent
b8e868caf6
commit
fd76a34277
+13
-13
@@ -34,14 +34,14 @@ FILE fqName:<root> fileName:/suspendConversion.kt
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.C [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||
FUN name:bar visibility:public modality:FINAL <> ($this:<root>.C) returnType:kotlin.Unit
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.C
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
@@ -62,7 +62,7 @@ FILE fqName:<root> fileName:/suspendConversion.kt
|
||||
FUN name:testNoCoversion visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun useSuspend (fn: kotlin.coroutines.SuspendFunction0<kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
fn: FUNCTION_REFERENCE 'public final fun foo0 (): kotlin.Unit [suspend] declared in <root>' type=kotlin.reflect.KSuspendFunction0<kotlin.Unit> origin=null reflectionTarget=<same>
|
||||
fn: FUNCTION_REFERENCE 'public final fun foo0 (): kotlin.Unit declared in <root>' type=kotlin.reflect.KSuspendFunction0<kotlin.Unit> origin=null reflectionTarget=<same>
|
||||
FUN name:testSuspendPlain visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun useSuspend (fn: kotlin.coroutines.SuspendFunction0<kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
@@ -70,7 +70,7 @@ FILE fqName:<root> fileName:/suspendConversion.kt
|
||||
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:foo1 visibility:local modality:FINAL <> () returnType:kotlin.Unit [suspend]
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun foo1 (): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
FUNCTION_REFERENCE 'local final fun foo1 (): kotlin.Unit [suspend] declared in <root>.testSuspendPlain' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun foo1 (): kotlin.Unit declared in <root>
|
||||
FUNCTION_REFERENCE 'local final fun foo1 (): kotlin.Unit declared in <root>.testSuspendPlain' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun foo1 (): kotlin.Unit declared in <root>
|
||||
FUN name:testSuspendWithArgs visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun useSuspendInt (fn: kotlin.coroutines.SuspendFunction1<kotlin.Int, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
@@ -80,7 +80,7 @@ FILE fqName:<root> fileName:/suspendConversion.kt
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun fooInt (x: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
x: GET_VAR 'p0: kotlin.Int declared in <root>.testSuspendWithArgs.fooInt' type=kotlin.Int origin=null
|
||||
FUNCTION_REFERENCE 'local final fun fooInt (p0: kotlin.Int): kotlin.Unit [suspend] declared in <root>.testSuspendWithArgs' type=kotlin.coroutines.SuspendFunction1<kotlin.Int, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun fooInt (x: kotlin.Int): kotlin.Unit declared in <root>
|
||||
FUNCTION_REFERENCE 'local final fun fooInt (p0: kotlin.Int): kotlin.Unit declared in <root>.testSuspendWithArgs' type=kotlin.coroutines.SuspendFunction1<kotlin.Int, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun fooInt (x: kotlin.Int): kotlin.Unit declared in <root>
|
||||
FUN name:testWithVararg visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun useSuspend (fn: kotlin.coroutines.SuspendFunction0<kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
@@ -88,7 +88,7 @@ FILE fqName:<root> fileName:/suspendConversion.kt
|
||||
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:foo2 visibility:local modality:FINAL <> () returnType:kotlin.Unit [suspend]
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun foo2 (vararg xs: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
FUNCTION_REFERENCE 'local final fun foo2 (): kotlin.Unit [suspend] declared in <root>.testWithVararg' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun foo2 (vararg xs: kotlin.Int): kotlin.Unit declared in <root>
|
||||
FUNCTION_REFERENCE 'local final fun foo2 (): kotlin.Unit declared in <root>.testWithVararg' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun foo2 (vararg xs: kotlin.Int): kotlin.Unit declared in <root>
|
||||
FUN name:testWithVarargMapped visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun useSuspendInt (fn: kotlin.coroutines.SuspendFunction1<kotlin.Int, kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
@@ -99,7 +99,7 @@ FILE fqName:<root> fileName:/suspendConversion.kt
|
||||
CALL 'public final fun foo2 (vararg xs: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
|
||||
GET_VAR 'p0: kotlin.Int declared in <root>.testWithVarargMapped.foo2' type=kotlin.Int origin=null
|
||||
FUNCTION_REFERENCE 'local final fun foo2 (p0: kotlin.Int): kotlin.Unit [suspend] declared in <root>.testWithVarargMapped' type=kotlin.coroutines.SuspendFunction1<kotlin.Int, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun foo2 (vararg xs: kotlin.Int): kotlin.Unit declared in <root>
|
||||
FUNCTION_REFERENCE 'local final fun foo2 (p0: kotlin.Int): kotlin.Unit declared in <root>.testWithVarargMapped' type=kotlin.coroutines.SuspendFunction1<kotlin.Int, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun foo2 (vararg xs: kotlin.Int): kotlin.Unit declared in <root>
|
||||
FUN name:testWithCoercionToUnit visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun useSuspend (fn: kotlin.coroutines.SuspendFunction0<kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
@@ -108,7 +108,7 @@ FILE fqName:<root> fileName:/suspendConversion.kt
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun foo3 (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
|
||||
FUNCTION_REFERENCE 'local final fun foo3 (): kotlin.Unit [suspend] declared in <root>.testWithCoercionToUnit' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun foo3 (): kotlin.Int declared in <root>
|
||||
FUNCTION_REFERENCE 'local final fun foo3 (): kotlin.Unit declared in <root>.testWithCoercionToUnit' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun foo3 (): kotlin.Int declared in <root>
|
||||
FUN name:testWithDefaults visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun useSuspend (fn: kotlin.coroutines.SuspendFunction0<kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
@@ -116,7 +116,7 @@ FILE fqName:<root> fileName:/suspendConversion.kt
|
||||
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:foo4 visibility:local modality:FINAL <> () returnType:kotlin.Unit [suspend]
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun foo4 (i: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
FUNCTION_REFERENCE 'local final fun foo4 (): kotlin.Unit [suspend] declared in <root>.testWithDefaults' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun foo4 (i: kotlin.Int): kotlin.Unit declared in <root>
|
||||
FUNCTION_REFERENCE 'local final fun foo4 (): kotlin.Unit declared in <root>.testWithDefaults' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun foo4 (i: kotlin.Int): kotlin.Unit declared in <root>
|
||||
FUN name:testWithBoundReceiver visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun useSuspend (fn: kotlin.coroutines.SuspendFunction0<kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
@@ -126,8 +126,8 @@ FILE fqName:<root> fileName:/suspendConversion.kt
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun bar (): kotlin.Unit declared in <root>.C' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR 'receiver: <root>.C declared in <root>.testWithBoundReceiver.bar' type=<root>.C origin=ADAPTED_FUNCTION_REFERENCE
|
||||
FUNCTION_REFERENCE 'local final fun bar (): kotlin.Unit [suspend] declared in <root>.testWithBoundReceiver' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun bar (): kotlin.Unit declared in <root>.C
|
||||
$receiver: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.C' type=<root>.C origin=null
|
||||
FUNCTION_REFERENCE 'local final fun bar (): kotlin.Unit declared in <root>.testWithBoundReceiver' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun bar (): kotlin.Unit declared in <root>.C
|
||||
$receiver: CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.C' type=<root>.C origin=null
|
||||
FUN name:testNullableParam visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun useSuspendNullable (fn: kotlin.coroutines.SuspendFunction0<kotlin.Unit>?): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
@@ -135,7 +135,7 @@ FILE fqName:<root> fileName:/suspendConversion.kt
|
||||
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:foo1 visibility:local modality:FINAL <> () returnType:kotlin.Unit [suspend]
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun foo1 (): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
FUNCTION_REFERENCE 'local final fun foo1 (): kotlin.Unit [suspend] declared in <root>.testNullableParam' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun foo1 (): kotlin.Unit declared in <root>
|
||||
FUNCTION_REFERENCE 'local final fun foo1 (): kotlin.Unit declared in <root>.testNullableParam' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun foo1 (): kotlin.Unit declared in <root>
|
||||
FUN name:testNestedNullableParam visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun useSuspendNestedNullable (fn: kotlin.coroutines.SuspendFunction0<kotlin.Unit>?): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
@@ -143,4 +143,4 @@ FILE fqName:<root> fileName:/suspendConversion.kt
|
||||
FUN ADAPTER_FOR_CALLABLE_REFERENCE name:foo1 visibility:local modality:FINAL <> () returnType:kotlin.Unit [suspend]
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun foo1 (): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
FUNCTION_REFERENCE 'local final fun foo1 (): kotlin.Unit [suspend] declared in <root>.testNestedNullableParam' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun foo1 (): kotlin.Unit declared in <root>
|
||||
FUNCTION_REFERENCE 'local final fun foo1 (): kotlin.Unit declared in <root>.testNestedNullableParam' type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun foo1 (): kotlin.Unit declared in <root>
|
||||
|
||||
Reference in New Issue
Block a user