[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
+34
-34
@@ -3,7 +3,7 @@ FILE fqName:<root> fileName:/referenceToCompanionFunction.kt
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Base
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.Base [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:Base modality:ABSTRACT visibility:public superTypes:[kotlin.Any]'
|
||||
FUN name:foo visibility:public modality:FINAL <> ($this:<root>.Base) returnType:kotlin.String
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Base
|
||||
@@ -14,7 +14,7 @@ FILE fqName:<root> fileName:/referenceToCompanionFunction.kt
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Base
|
||||
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]
|
||||
@@ -29,13 +29,13 @@ FILE fqName:<root> fileName:/referenceToCompanionFunction.kt
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Some
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.Some [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:Some modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||
CLASS OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[<root>.Base]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Some.Companion
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Some.Companion [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Base'
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Base'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[<root>.Base]'
|
||||
FUN name:bar visibility:public modality:OPEN <> ($this:<root>.Some.Companion) returnType:kotlin.String
|
||||
overridden:
|
||||
@@ -50,20 +50,20 @@ FILE fqName:<root> fileName:/referenceToCompanionFunction.kt
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Base
|
||||
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 [fake_override,operator] declared in <root>.Base
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Base
|
||||
$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]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int [fake_override] declared in <root>.Base
|
||||
public open fun hashCode (): kotlin.Int declared in <root>.Base
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String [fake_override] declared in <root>.Base
|
||||
public open fun toString (): kotlin.String declared in <root>.Base
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
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]
|
||||
@@ -78,7 +78,7 @@ FILE fqName:<root> fileName:/referenceToCompanionFunction.kt
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Singleton
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Singleton [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Base'
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Base'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Singleton modality:FINAL visibility:public superTypes:[<root>.Base]'
|
||||
FUN name:bar visibility:public modality:OPEN <> ($this:<root>.Singleton) returnType:kotlin.String
|
||||
overridden:
|
||||
@@ -93,64 +93,64 @@ FILE fqName:<root> fileName:/referenceToCompanionFunction.kt
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Base
|
||||
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 [fake_override,operator] declared in <root>.Base
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Base
|
||||
$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]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int [fake_override] declared in <root>.Base
|
||||
public open fun hashCode (): kotlin.Int declared in <root>.Base
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String [fake_override] declared in <root>.Base
|
||||
public open fun toString (): kotlin.String declared in <root>.Base
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
VAR name:ref1 type:kotlin.reflect.KFunction0<kotlin.String> [val]
|
||||
FUNCTION_REFERENCE 'public final fun foo (): kotlin.String [fake_override] declared in <root>.Some.Companion' type=kotlin.reflect.KFunction0<kotlin.String> origin=null reflectionTarget=<same>
|
||||
FUNCTION_REFERENCE 'public final fun foo (): kotlin.String declared in <root>.Some.Companion' type=kotlin.reflect.KFunction0<kotlin.String> origin=null reflectionTarget=<same>
|
||||
$this: GET_OBJECT 'CLASS OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[<root>.Base]' type=<root>.Some.Companion
|
||||
VAR name:ref2 type:kotlin.reflect.KFunction0<kotlin.String> [val]
|
||||
FUNCTION_REFERENCE 'public open fun bar (): kotlin.String declared in <root>.Some.Companion' type=kotlin.reflect.KFunction0<kotlin.String> origin=null reflectionTarget=<same>
|
||||
$this: GET_OBJECT 'CLASS OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[<root>.Base]' type=<root>.Some.Companion
|
||||
VAR name:ref3 type:kotlin.reflect.KFunction0<kotlin.String> [val]
|
||||
FUNCTION_REFERENCE 'public final fun foo (): kotlin.String [fake_override] declared in <root>.Some.Companion' type=kotlin.reflect.KFunction0<kotlin.String> origin=null reflectionTarget=<same>
|
||||
FUNCTION_REFERENCE 'public final fun foo (): kotlin.String declared in <root>.Some.Companion' type=kotlin.reflect.KFunction0<kotlin.String> origin=null reflectionTarget=<same>
|
||||
$this: GET_OBJECT 'CLASS OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[<root>.Base]' type=<root>.Some.Companion
|
||||
VAR name:ref4 type:kotlin.reflect.KFunction0<kotlin.String> [val]
|
||||
FUNCTION_REFERENCE 'public open fun bar (): kotlin.String declared in <root>.Some.Companion' type=kotlin.reflect.KFunction0<kotlin.String> origin=null reflectionTarget=<same>
|
||||
$this: GET_OBJECT 'CLASS OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[<root>.Base]' type=<root>.Some.Companion
|
||||
VAR name:ref5 type:kotlin.reflect.KFunction0<kotlin.String> [val]
|
||||
FUNCTION_REFERENCE 'public final fun foo (): kotlin.String [fake_override] declared in <root>.Singleton' type=kotlin.reflect.KFunction0<kotlin.String> origin=null reflectionTarget=<same>
|
||||
FUNCTION_REFERENCE 'public final fun foo (): kotlin.String declared in <root>.Singleton' type=kotlin.reflect.KFunction0<kotlin.String> origin=null reflectionTarget=<same>
|
||||
$this: GET_OBJECT 'CLASS OBJECT name:Singleton modality:FINAL visibility:public superTypes:[<root>.Base]' type=<root>.Singleton
|
||||
VAR name:ref6 type:kotlin.reflect.KFunction0<kotlin.String> [val]
|
||||
FUNCTION_REFERENCE 'public open fun bar (): kotlin.String declared in <root>.Singleton' type=kotlin.reflect.KFunction0<kotlin.String> origin=null reflectionTarget=<same>
|
||||
$this: GET_OBJECT 'CLASS OBJECT name:Singleton modality:FINAL visibility:public superTypes:[<root>.Base]' type=<root>.Singleton
|
||||
VAR name:result type:kotlin.String [val]
|
||||
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=PLUS
|
||||
$this: CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=PLUS
|
||||
$this: CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=PLUS
|
||||
$this: CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=PLUS
|
||||
$this: CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=PLUS
|
||||
$this: CALL 'public abstract fun invoke (): R of kotlin.reflect.KFunction0 [operator] declared in kotlin.reflect.KFunction0' type=kotlin.String origin=INVOKE
|
||||
$this: GET_VAR 'val ref1: kotlin.reflect.KFunction0<kotlin.String> [val] declared in <root>.box' type=kotlin.reflect.KFunction0<kotlin.String> origin=VARIABLE_AS_FUNCTION
|
||||
other: CALL 'public abstract fun invoke (): R of kotlin.reflect.KFunction0 [operator] declared in kotlin.reflect.KFunction0' type=kotlin.String origin=INVOKE
|
||||
$this: GET_VAR 'val ref2: kotlin.reflect.KFunction0<kotlin.String> [val] declared in <root>.box' type=kotlin.reflect.KFunction0<kotlin.String> origin=VARIABLE_AS_FUNCTION
|
||||
other: CALL 'public abstract fun invoke (): R of kotlin.reflect.KFunction0 [operator] declared in kotlin.reflect.KFunction0' type=kotlin.String origin=INVOKE
|
||||
$this: GET_VAR 'val ref3: kotlin.reflect.KFunction0<kotlin.String> [val] declared in <root>.box' type=kotlin.reflect.KFunction0<kotlin.String> origin=VARIABLE_AS_FUNCTION
|
||||
other: CALL 'public abstract fun invoke (): R of kotlin.reflect.KFunction0 [operator] declared in kotlin.reflect.KFunction0' type=kotlin.String origin=INVOKE
|
||||
$this: GET_VAR 'val ref4: kotlin.reflect.KFunction0<kotlin.String> [val] declared in <root>.box' type=kotlin.reflect.KFunction0<kotlin.String> origin=VARIABLE_AS_FUNCTION
|
||||
other: CALL 'public abstract fun invoke (): R of kotlin.reflect.KFunction0 [operator] declared in kotlin.reflect.KFunction0' type=kotlin.String origin=INVOKE
|
||||
$this: GET_VAR 'val ref5: kotlin.reflect.KFunction0<kotlin.String> [val] declared in <root>.box' type=kotlin.reflect.KFunction0<kotlin.String> origin=VARIABLE_AS_FUNCTION
|
||||
other: CALL 'public abstract fun invoke (): R of kotlin.reflect.KFunction0 [operator] declared in kotlin.reflect.KFunction0' type=kotlin.String origin=INVOKE
|
||||
$this: GET_VAR 'val ref6: kotlin.reflect.KFunction0<kotlin.String> [val] declared in <root>.box' type=kotlin.reflect.KFunction0<kotlin.String> origin=VARIABLE_AS_FUNCTION
|
||||
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUS
|
||||
$this: CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUS
|
||||
$this: CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUS
|
||||
$this: CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUS
|
||||
$this: CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUS
|
||||
$this: CALL 'public abstract fun invoke (): R of kotlin.reflect.KFunction0 declared in kotlin.reflect.KFunction0' type=kotlin.String origin=INVOKE
|
||||
$this: GET_VAR 'val ref1: kotlin.reflect.KFunction0<kotlin.String> declared in <root>.box' type=kotlin.reflect.KFunction0<kotlin.String> origin=VARIABLE_AS_FUNCTION
|
||||
other: CALL 'public abstract fun invoke (): R of kotlin.reflect.KFunction0 declared in kotlin.reflect.KFunction0' type=kotlin.String origin=INVOKE
|
||||
$this: GET_VAR 'val ref2: kotlin.reflect.KFunction0<kotlin.String> declared in <root>.box' type=kotlin.reflect.KFunction0<kotlin.String> origin=VARIABLE_AS_FUNCTION
|
||||
other: CALL 'public abstract fun invoke (): R of kotlin.reflect.KFunction0 declared in kotlin.reflect.KFunction0' type=kotlin.String origin=INVOKE
|
||||
$this: GET_VAR 'val ref3: kotlin.reflect.KFunction0<kotlin.String> declared in <root>.box' type=kotlin.reflect.KFunction0<kotlin.String> origin=VARIABLE_AS_FUNCTION
|
||||
other: CALL 'public abstract fun invoke (): R of kotlin.reflect.KFunction0 declared in kotlin.reflect.KFunction0' type=kotlin.String origin=INVOKE
|
||||
$this: GET_VAR 'val ref4: kotlin.reflect.KFunction0<kotlin.String> declared in <root>.box' type=kotlin.reflect.KFunction0<kotlin.String> origin=VARIABLE_AS_FUNCTION
|
||||
other: CALL 'public abstract fun invoke (): R of kotlin.reflect.KFunction0 declared in kotlin.reflect.KFunction0' type=kotlin.String origin=INVOKE
|
||||
$this: GET_VAR 'val ref5: kotlin.reflect.KFunction0<kotlin.String> declared in <root>.box' type=kotlin.reflect.KFunction0<kotlin.String> origin=VARIABLE_AS_FUNCTION
|
||||
other: CALL 'public abstract fun invoke (): R of kotlin.reflect.KFunction0 declared in kotlin.reflect.KFunction0' type=kotlin.String origin=INVOKE
|
||||
$this: GET_VAR 'val ref6: kotlin.reflect.KFunction0<kotlin.String> declared in <root>.box' type=kotlin.reflect.KFunction0<kotlin.String> origin=VARIABLE_AS_FUNCTION
|
||||
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
|
||||
WHEN type=kotlin.String origin=IF
|
||||
BRANCH
|
||||
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'val result: kotlin.String [val] declared in <root>.box' type=kotlin.String origin=null
|
||||
arg0: GET_VAR 'val result: kotlin.String declared in <root>.box' type=kotlin.String origin=null
|
||||
arg1: CONST String type=kotlin.String value="ABABAC"
|
||||
then: CONST String type=kotlin.String value="OK"
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
then: STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="Fail: "
|
||||
GET_VAR 'val result: kotlin.String [val] declared in <root>.box' type=kotlin.String origin=null
|
||||
GET_VAR 'val result: kotlin.String declared in <root>.box' type=kotlin.String origin=null
|
||||
|
||||
Reference in New Issue
Block a user