From e34246faecaafe2c63ac2c95e345a63c6a049429 Mon Sep 17 00:00:00 2001 From: Ivan Kylchik Date: Mon, 22 Jun 2020 10:08:50 +0300 Subject: [PATCH] Fix fir2ir text tests after introducing const evaluator --- .../declarations/constValInitializers.fir.txt | 76 ------------------- .../declarations/constValInitializers.kt | 1 + .../whenByFloatingPoint.fir.txt | 15 ++-- ...icConstructorCallWithTypeArguments.fir.txt | 4 +- .../ir/irText/expressions/ifElseIf.fir.txt | 3 +- .../ir/irText/expressions/kt28006.fir.txt | 12 +-- .../primitivesImplicitConversions.fir.txt | 18 ++--- .../signedToUnsignedConversions_test.fir.txt | 16 ++-- .../expressions/simpleUnaryOperators.fir.txt | 9 +-- .../whenWithSubjectVariable.fir.txt | 3 +- 10 files changed, 28 insertions(+), 129 deletions(-) delete mode 100644 compiler/testData/ir/irText/declarations/constValInitializers.fir.txt diff --git a/compiler/testData/ir/irText/declarations/constValInitializers.fir.txt b/compiler/testData/ir/irText/declarations/constValInitializers.fir.txt deleted file mode 100644 index c8f8bec347c..00000000000 --- a/compiler/testData/ir/irText/declarations/constValInitializers.fir.txt +++ /dev/null @@ -1,76 +0,0 @@ -FILE fqName: fileName:/constValInitializers.kt - PROPERTY name:I0 visibility:public modality:FINAL [const,val] - FIELD PROPERTY_BACKING_FIELD name:I0 type:kotlin.Int visibility:public [final,static] - EXPRESSION_BODY - CONST Int type=kotlin.Int value=0 - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int - correspondingProperty: PROPERTY name:I0 visibility:public modality:FINAL [const,val] - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:I0 type:kotlin.Int visibility:public [final,static]' type=kotlin.Int origin=null - PROPERTY name:I1 visibility:public modality:FINAL [const,val] - FIELD PROPERTY_BACKING_FIELD name:I1 type:kotlin.Int visibility:public [final,static] - EXPRESSION_BODY - CONST Int type=kotlin.Int value=1 - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int - correspondingProperty: PROPERTY name:I1 visibility:public modality:FINAL [const,val] - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:I1 type:kotlin.Int visibility:public [final,static]' type=kotlin.Int origin=null - PROPERTY name:I2 visibility:public modality:FINAL [const,val] - FIELD PROPERTY_BACKING_FIELD name:I2 type:kotlin.Int visibility:public [final,static] - EXPRESSION_BODY - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS - $this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS - $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY - other: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY - other: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int - correspondingProperty: PROPERTY name:I2 visibility:public modality:FINAL [const,val] - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:I2 type:kotlin.Int visibility:public [final,static]' type=kotlin.Int origin=null - PROPERTY name:STR1 visibility:public modality:FINAL [const,val] - FIELD PROPERTY_BACKING_FIELD name:STR1 type:kotlin.String visibility:public [final,static] - EXPRESSION_BODY - CONST String type=kotlin.String value="String1" - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String - correspondingProperty: PROPERTY name:STR1 visibility:public modality:FINAL [const,val] - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:STR1 type:kotlin.String visibility:public [final,static]' type=kotlin.String origin=null - PROPERTY name:STR2 visibility:public modality:FINAL [const,val] - FIELD PROPERTY_BACKING_FIELD name:STR2 type:kotlin.String visibility:public [final,static] - EXPRESSION_BODY - CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=PLUS - $this: CONST String type=kotlin.String value="String" - other: CONST String type=kotlin.String value="2" - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String - correspondingProperty: PROPERTY name:STR2 visibility:public modality:FINAL [const,val] - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:STR2 type:kotlin.String visibility:public [final,static]' type=kotlin.String origin=null - PROPERTY name:STR3 visibility:public modality:FINAL [const,val] - FIELD PROPERTY_BACKING_FIELD name:STR3 type:kotlin.String visibility:public [final,static] - EXPRESSION_BODY - 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 (): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY - other: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String - correspondingProperty: PROPERTY name:STR3 visibility:public modality:FINAL [const,val] - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:STR3 type:kotlin.String visibility:public [final,static]' type=kotlin.String origin=null - PROPERTY name:STR4 visibility:public modality:FINAL [const,val] - FIELD PROPERTY_BACKING_FIELD name:STR4 type:kotlin.String visibility:public [final,static] - EXPRESSION_BODY - STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null - $this: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY - CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null - $this: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String - correspondingProperty: PROPERTY name:STR4 visibility:public modality:FINAL [const,val] - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:STR4 type:kotlin.String visibility:public [final,static]' type=kotlin.String origin=null diff --git a/compiler/testData/ir/irText/declarations/constValInitializers.kt b/compiler/testData/ir/irText/declarations/constValInitializers.kt index f8f885d9b8a..605f1730cd0 100644 --- a/compiler/testData/ir/irText/declarations/constValInitializers.kt +++ b/compiler/testData/ir/irText/declarations/constValInitializers.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL const val I0 = 0 const val I1 = 1 const val I2 = I0 + I1 + I1 diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.fir.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.fir.txt index c56f47b511b..4db4c8cb250 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.fir.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.fir.txt @@ -23,8 +23,7 @@ FILE fqName: fileName:/whenByFloatingPoint.kt if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .testSmartCastInWhenSubject' type=kotlin.Any origin=null then: RETURN type=kotlin.Nothing from='public final fun testSmartCastInWhenSubject (x: kotlin.Any): kotlin.Int declared in ' - CALL 'public final fun unaryMinus (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: CONST Int type=kotlin.Int value=1 + CONST Int type=kotlin.Int value=-1 RETURN type=kotlin.Nothing from='public final fun testSmartCastInWhenSubject (x: kotlin.Any): kotlin.Int declared in ' BLOCK type=kotlin.Int origin=WHEN VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Double [val] @@ -48,8 +47,7 @@ FILE fqName: fileName:/whenByFloatingPoint.kt if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Double GET_VAR 'y: kotlin.Any declared in .testSmartCastInWhenCondition' type=kotlin.Any origin=null then: RETURN type=kotlin.Nothing from='public final fun testSmartCastInWhenCondition (x: kotlin.Double, y: kotlin.Any): kotlin.Int declared in ' - CALL 'public final fun unaryMinus (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: CONST Int type=kotlin.Int value=1 + CONST Int type=kotlin.Int value=-1 RETURN type=kotlin.Nothing from='public final fun testSmartCastInWhenCondition (x: kotlin.Double, y: kotlin.Any): kotlin.Int declared in ' BLOCK type=kotlin.Int origin=WHEN VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Double [val] @@ -75,8 +73,7 @@ FILE fqName: fileName:/whenByFloatingPoint.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Double GET_VAR 'val tmp_3: kotlin.Any [val] declared in .testSmartCastInWhenConditionInBranch' type=kotlin.Any origin=null - then: CALL 'public final fun unaryMinus (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: CONST Int type=kotlin.Int value=1 + then: CONST Int type=kotlin.Int value=-1 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 tmp_3: kotlin.Any [val] declared in .testSmartCastInWhenConditionInBranch' type=kotlin.Any origin=null @@ -94,15 +91,13 @@ FILE fqName: fileName:/whenByFloatingPoint.kt if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .testSmartCastToDifferentTypes' type=kotlin.Any origin=null then: RETURN type=kotlin.Nothing from='public final fun testSmartCastToDifferentTypes (x: kotlin.Any, y: kotlin.Any): kotlin.Int declared in ' - CALL 'public final fun unaryMinus (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: CONST Int type=kotlin.Int value=1 + CONST Int type=kotlin.Int value=-1 WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Float GET_VAR 'y: kotlin.Any declared in .testSmartCastToDifferentTypes' type=kotlin.Any origin=null then: RETURN type=kotlin.Nothing from='public final fun testSmartCastToDifferentTypes (x: kotlin.Any, y: kotlin.Any): kotlin.Int declared in ' - CALL 'public final fun unaryMinus (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: CONST Int type=kotlin.Int value=1 + CONST Int type=kotlin.Int value=-1 RETURN type=kotlin.Nothing from='public final fun testSmartCastToDifferentTypes (x: kotlin.Any, y: kotlin.Any): kotlin.Int declared in ' BLOCK type=kotlin.Int origin=WHEN VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Double [val] diff --git a/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.fir.txt b/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.fir.txt index 45079ea0a69..fd974469499 100644 --- a/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.fir.txt +++ b/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.fir.txt @@ -4,9 +4,7 @@ FILE fqName: fileName:/genericConstructorCallWithTypeArguments.kt RETURN type=kotlin.Nothing from='public final fun testSimple (): .Box declared in ' CONSTRUCTOR_CALL 'public constructor (value: T of .Box) [primary] declared in .Box' type=.Box origin=null : kotlin.Long - value: CALL 'public final fun times (other: kotlin.Long): kotlin.Long [operator] declared in kotlin.Long' type=kotlin.Long origin=null - $this: CONST Long type=kotlin.Long value=2 - other: CONST Long type=kotlin.Long value=3 + value: CONST Long type=kotlin.Long value=6 FUN name:testArray visibility:public modality:FINAL (n:kotlin.Int, block:kotlin.Function0.testArray>) returnType:kotlin.Array.testArray> [inline] TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] VALUE_PARAMETER name:n index:0 type:kotlin.Int diff --git a/compiler/testData/ir/irText/expressions/ifElseIf.fir.txt b/compiler/testData/ir/irText/expressions/ifElseIf.fir.txt index 87d0a700c3f..33ebe2a4ea1 100644 --- a/compiler/testData/ir/irText/expressions/ifElseIf.fir.txt +++ b/compiler/testData/ir/irText/expressions/ifElseIf.fir.txt @@ -16,8 +16,7 @@ FILE fqName: fileName:/ifElseIf.kt if: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT arg0: GET_VAR 'i: kotlin.Int declared in .test' type=kotlin.Int origin=null arg1: CONST Int type=kotlin.Int value=0 - then: CALL 'public final fun unaryMinus (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: CONST Int type=kotlin.Int value=1 + then: CONST Int type=kotlin.Int value=-1 BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Int type=kotlin.Int value=0 diff --git a/compiler/testData/ir/irText/expressions/kt28006.fir.txt b/compiler/testData/ir/irText/expressions/kt28006.fir.txt index be694beeed9..2df56df1066 100644 --- a/compiler/testData/ir/irText/expressions/kt28006.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt28006.fir.txt @@ -38,11 +38,7 @@ FILE fqName: fileName:/kt28006.kt PROPERTY name:testConst3 visibility:public modality:FINAL [const,val] FIELD PROPERTY_BACKING_FIELD name:testConst3 type:kotlin.String visibility:public [final,static] EXPRESSION_BODY - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="\uD83E" - CONST String type=kotlin.String value="\uDD17" - CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null - $this: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY + CONST String type=kotlin.String value="\uD83E\uDD17\uD83E\uDD17\uD83E\uDD17" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String correspondingProperty: PROPERTY name:testConst3 visibility:public modality:FINAL [const,val] BLOCK_BODY @@ -51,11 +47,7 @@ FILE fqName: fileName:/kt28006.kt PROPERTY name:testConst4 visibility:public modality:FINAL [const,val] FIELD PROPERTY_BACKING_FIELD name:testConst4 type:kotlin.String visibility:public [final,static] EXPRESSION_BODY - STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null - $this: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY - CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null - $this: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY + CONST String type=kotlin.String value="\uD83E\uDD17\uD83E\uDD17\uD83E\uDD17\uD83E\uDD17" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String correspondingProperty: PROPERTY name:testConst4 visibility:public modality:FINAL [const,val] BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/primitivesImplicitConversions.fir.txt b/compiler/testData/ir/irText/expressions/primitivesImplicitConversions.fir.txt index 0ff7105e522..37e765acb2c 100644 --- a/compiler/testData/ir/irText/expressions/primitivesImplicitConversions.fir.txt +++ b/compiler/testData/ir/irText/expressions/primitivesImplicitConversions.fir.txt @@ -65,30 +65,24 @@ FILE fqName: fileName:/primitivesImplicitConversions.kt VAR name:test3 type:kotlin.Long? [val] CONST Int type=kotlin.Int value=42 VAR name:test4 type:kotlin.Long? [val] - CALL 'public final fun unaryMinus (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: CONST Int type=kotlin.Int value=1 + CONST Int type=kotlin.Int value=-1 VAR name:test5 type:kotlin.Long? [val] - CALL 'public final fun unaryMinus (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: CONST Int type=kotlin.Int value=1 + CONST Int type=kotlin.Int value=-1 VAR name:test6 type:kotlin.Short? [val] - CALL 'public final fun unaryMinus (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: CONST Int type=kotlin.Int value=1 + CONST Int type=kotlin.Int value=-1 VAR name:test7 type:kotlin.Byte? [val] - CALL 'public final fun unaryMinus (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: CONST Int type=kotlin.Int value=1 + CONST Int type=kotlin.Int value=-1 FUN name:testImplicitArguments visibility:public modality:FINAL <> (x:kotlin.Long) returnType:kotlin.Unit VALUE_PARAMETER name:x index:0 type:kotlin.Long EXPRESSION_BODY - CALL 'public final fun unaryMinus (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: CONST Int type=kotlin.Int value=1 + CONST Int type=kotlin.Int value=-1 BLOCK_BODY CLASS CLASS name:TestImplicitArguments modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestImplicitArguments CONSTRUCTOR visibility:public <> (x:kotlin.Long) returnType:.TestImplicitArguments [primary] VALUE_PARAMETER name:x index:0 type:kotlin.Long EXPRESSION_BODY - CALL 'public final fun unaryMinus (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: CONST Int type=kotlin.Int value=1 + CONST Int type=kotlin.Int value=-1 BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestImplicitArguments modality:FINAL visibility:public superTypes:[kotlin.Any]' diff --git a/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_test.fir.txt b/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_test.fir.txt index 6a3dce65eb7..a23886530df 100644 --- a/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_test.fir.txt +++ b/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_test.fir.txt @@ -98,18 +98,18 @@ FILE fqName: fileName:/signedToUnsignedConversions_test.kt FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY ERROR_CALL 'Unresolved reference: #' type=IrErrorType - CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY + CONST Int type=kotlin.Int value=255 ERROR_CALL 'Unresolved reference: #' type=IrErrorType - CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY + CONST Int type=kotlin.Int value=255 ERROR_CALL 'Unresolved reference: #' type=IrErrorType - CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY + CONST Int type=kotlin.Int value=255 ERROR_CALL 'Unresolved reference: #' type=IrErrorType - CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY + CONST Int type=kotlin.Int value=256 ERROR_CALL 'Unresolved reference: #' type=IrErrorType - CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY + CONST Int type=kotlin.Int value=255 ERROR_CALL 'Unresolved reference: #' type=IrErrorType - CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY + CONST Int type=kotlin.Int value=255 ERROR_CALL 'Unresolved reference: #' type=IrErrorType - CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY - CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY + CONST Int type=kotlin.Int value=255 + CONST Int type=kotlin.Int value=255 CONST Int type=kotlin.UInt value=42 diff --git a/compiler/testData/ir/irText/expressions/simpleUnaryOperators.fir.txt b/compiler/testData/ir/irText/expressions/simpleUnaryOperators.fir.txt index 7852cacdd84..8fcc54e4e44 100644 --- a/compiler/testData/ir/irText/expressions/simpleUnaryOperators.fir.txt +++ b/compiler/testData/ir/irText/expressions/simpleUnaryOperators.fir.txt @@ -8,8 +8,7 @@ FILE fqName: fileName:/simpleUnaryOperators.kt FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2 (): kotlin.Int declared in ' - CALL 'public final fun unaryMinus (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: CONST Int type=kotlin.Int value=42 + CONST Int type=kotlin.Int value=-42 FUN name:test3 visibility:public modality:FINAL <> (x:kotlin.Int) returnType:kotlin.Int VALUE_PARAMETER name:x index:0 type:kotlin.Int BLOCK_BODY @@ -19,8 +18,7 @@ FILE fqName: fileName:/simpleUnaryOperators.kt FUN name:test4 visibility:public modality:FINAL <> () returnType:kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test4 (): kotlin.Int declared in ' - CALL 'public final fun unaryPlus (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: CONST Int type=kotlin.Int value=42 + CONST Int type=kotlin.Int value=42 FUN name:test5 visibility:public modality:FINAL <> (x:kotlin.Boolean) returnType:kotlin.Boolean VALUE_PARAMETER name:x index:0 type:kotlin.Boolean BLOCK_BODY @@ -30,5 +28,4 @@ FILE fqName: fileName:/simpleUnaryOperators.kt FUN name:test6 visibility:public modality:FINAL <> () returnType:kotlin.Boolean BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test6 (): kotlin.Boolean declared in ' - CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=null - $this: CONST Boolean type=kotlin.Boolean value=true + CONST Boolean type=kotlin.Boolean value=false diff --git a/compiler/testData/ir/irText/expressions/whenWithSubjectVariable.fir.txt b/compiler/testData/ir/irText/expressions/whenWithSubjectVariable.fir.txt index 8f33f780b77..9d6b1f0c331 100644 --- a/compiler/testData/ir/irText/expressions/whenWithSubjectVariable.fir.txt +++ b/compiler/testData/ir/irText/expressions/whenWithSubjectVariable.fir.txt @@ -34,5 +34,4 @@ FILE fqName: fileName:/whenWithSubjectVariable.kt then: CONST Int type=kotlin.Int value=4 BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public final fun unaryMinus (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: CONST Int type=kotlin.Int value=1 + then: CONST Int type=kotlin.Int value=-1