FIR: don't call toString() inside string concatenations
This commit is contained in:
@@ -87,10 +87,9 @@ FILE fqName:<root> fileName:/noSymbolForIntRangeIterator.kt
|
||||
CALL 'public final fun appendLine (value: kotlin.String?): java.lang.StringBuilder [inline] declared in kotlin.text.StringsKt' type=java.lang.StringBuilder origin=null
|
||||
$receiver: GET_VAR '<this>: java.lang.StringBuilder declared in <root>.test.localFunc.<anonymous>' type=java.lang.StringBuilder origin=null
|
||||
value: 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 times (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=MUL
|
||||
$this: GET_VAR 'val i: kotlin.Int [val] declared in <root>.test.localFunc' type=kotlin.Int origin=null
|
||||
other: GET_VAR 'val j: kotlin.Int [val] declared in <root>.test.localFunc.<anonymous>' type=kotlin.Int origin=null
|
||||
CALL 'public final fun times (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=MUL
|
||||
$this: GET_VAR 'val i: kotlin.Int [val] declared in <root>.test.localFunc' type=kotlin.Int origin=null
|
||||
other: GET_VAR 'val j: kotlin.Int [val] declared in <root>.test.localFunc.<anonymous>' type=kotlin.Int origin=null
|
||||
CALL 'public final fun takeString (s: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
s: GET_VAR 'val s: kotlin.String [val] declared in <root>.test.localFunc' type=kotlin.String origin=null
|
||||
CALL 'local final fun localFunc (): kotlin.Unit declared in <root>.test' type=kotlin.Unit origin=null
|
||||
@@ -108,5 +107,4 @@ FILE fqName:<root> fileName:/noSymbolForIntRangeIterator.kt
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
then: STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="Fail: "
|
||||
CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null
|
||||
$this: CALL 'public final fun <get-result> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
|
||||
CALL 'public final fun <get-result> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
|
||||
|
||||
@@ -5,7 +5,7 @@ class X {}
|
||||
val s = java
|
||||
val ss = System
|
||||
val sss = X
|
||||
val x = "${<!UNRESOLVED_REFERENCE!>System<!>}"
|
||||
val x = "${System}"
|
||||
val xs = java.lang
|
||||
val xss = java.lang.System
|
||||
val xsss = foo.X
|
||||
|
||||
@@ -50,7 +50,7 @@ open enum class A : Enum<A> {
|
||||
}
|
||||
|
||||
open fun f(): String {
|
||||
return <this>.<get-prop1>().toString() + "#" + <this>.<get-prop2>().toString() + "#" + <this>.<get-prop3>().toString()
|
||||
return <this>.<get-prop1>() + "#" + <this>.<get-prop2>() + "#" + <this>.<get-prop3>()
|
||||
}
|
||||
|
||||
fun values(): Array<A> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
@@ -159,17 +159,14 @@ FILE fqName:<root> fileName:/enumWithMultipleCtors.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun f (): kotlin.String declared in <root>.A'
|
||||
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 <get-prop1> (): kotlin.String declared in <root>.A' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR '<this>: <root>.A declared in <root>.A.f' type=<root>.A origin=null
|
||||
CALL 'public final fun <get-prop1> (): kotlin.String declared in <root>.A' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR '<this>: <root>.A declared in <root>.A.f' type=<root>.A origin=null
|
||||
CONST String type=kotlin.String value="#"
|
||||
CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null
|
||||
$this: CALL 'public final fun <get-prop2> (): kotlin.String declared in <root>.A' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR '<this>: <root>.A declared in <root>.A.f' type=<root>.A origin=null
|
||||
CALL 'public final fun <get-prop2> (): kotlin.String declared in <root>.A' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR '<this>: <root>.A declared in <root>.A.f' type=<root>.A origin=null
|
||||
CONST String type=kotlin.String value="#"
|
||||
CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null
|
||||
$this: CALL 'public final fun <get-prop3> (): kotlin.String declared in <root>.A' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR '<this>: <root>.A declared in <root>.A.f' type=<root>.A origin=null
|
||||
CALL 'public final fun <get-prop3> (): kotlin.String declared in <root>.A' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR '<this>: <root>.A declared in <root>.A.f' type=<root>.A origin=null
|
||||
FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.A>
|
||||
SYNTHETIC_BODY kind=ENUM_VALUES
|
||||
FUN ENUM_CLASS_SPECIAL_MEMBER name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.A
|
||||
|
||||
@@ -65,7 +65,7 @@ fun testContinueDoWhile() {
|
||||
when {
|
||||
greater(arg0 = k, arg1 = 2) -> continue
|
||||
}
|
||||
s = s.plus(other = k.toString() + ";")
|
||||
s = s.plus(other = k + ";")
|
||||
// } while (less(arg0 = k, arg1 = 10))
|
||||
}
|
||||
when {
|
||||
|
||||
@@ -126,8 +126,7 @@ FILE fqName:<root> fileName:/breakContinueInWhen.kt
|
||||
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=null
|
||||
$this: GET_VAR 'var s: kotlin.String [var] declared in <root>.testContinueDoWhile' type=kotlin.String origin=null
|
||||
other: STRING_CONCATENATION type=kotlin.String
|
||||
CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null
|
||||
$this: GET_VAR 'var k: kotlin.Int [var] declared in <root>.testContinueDoWhile' type=kotlin.Int origin=null
|
||||
GET_VAR 'var k: kotlin.Int [var] declared in <root>.testContinueDoWhile' type=kotlin.Int origin=null
|
||||
CONST String type=kotlin.String value=";"
|
||||
condition: 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 'var k: kotlin.Int [var] declared in <root>.testContinueDoWhile' type=kotlin.Int origin=null
|
||||
|
||||
@@ -23,14 +23,14 @@ const val testConst4: String
|
||||
get
|
||||
|
||||
fun test1(x: Int): String {
|
||||
return "\uD83E" + "\uDD17" + x.toString()
|
||||
return "\uD83E" + "\uDD17" + x
|
||||
}
|
||||
|
||||
fun test2(x: Int): String {
|
||||
return x.toString() + "\uD83E" + "\uDD17"
|
||||
return x + "\uD83E" + "\uDD17"
|
||||
}
|
||||
|
||||
fun test3(x: Int): String {
|
||||
return x.toString() + "\uD83E" + "\uDD17" + x.toString()
|
||||
return x + "\uD83E" + "\uDD17" + x
|
||||
}
|
||||
|
||||
|
||||
+4
-8
@@ -60,15 +60,13 @@ FILE fqName:<root> fileName:/kt28006.kt
|
||||
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: GET_VAR 'x: kotlin.Int declared in <root>.test1' type=kotlin.Int origin=null
|
||||
GET_VAR 'x: kotlin.Int declared in <root>.test1' type=kotlin.Int origin=null
|
||||
FUN name:test2 visibility:public modality:FINAL <> (x:kotlin.Int) returnType:kotlin.String
|
||||
VALUE_PARAMETER name:x index:0 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun test2 (x: kotlin.Int): kotlin.String declared in <root>'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null
|
||||
$this: GET_VAR 'x: kotlin.Int declared in <root>.test2' type=kotlin.Int origin=null
|
||||
GET_VAR 'x: kotlin.Int declared in <root>.test2' type=kotlin.Int origin=null
|
||||
CONST String type=kotlin.String value="\uD83E"
|
||||
CONST String type=kotlin.String value="\uDD17"
|
||||
FUN name:test3 visibility:public modality:FINAL <> (x:kotlin.Int) returnType:kotlin.String
|
||||
@@ -76,9 +74,7 @@ FILE fqName:<root> fileName:/kt28006.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun test3 (x: kotlin.Int): kotlin.String declared in <root>'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null
|
||||
$this: GET_VAR 'x: kotlin.Int declared in <root>.test3' type=kotlin.Int origin=null
|
||||
GET_VAR 'x: kotlin.Int declared in <root>.test3' type=kotlin.Int origin=null
|
||||
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: GET_VAR 'x: kotlin.Int declared in <root>.test3' type=kotlin.Int origin=null
|
||||
GET_VAR 'x: kotlin.Int declared in <root>.test3' type=kotlin.Int origin=null
|
||||
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
object A {
|
||||
private constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
private val a: String
|
||||
field = "$"
|
||||
private get
|
||||
|
||||
private val b: String
|
||||
field = "1234" + <this>.<get-a>().toString()
|
||||
private get
|
||||
|
||||
private val c: Int
|
||||
field = 10000
|
||||
private get
|
||||
|
||||
}
|
||||
-57
@@ -1,57 +0,0 @@
|
||||
FILE fqName:<root> fileName:/objectReferenceInFieldInitializer.kt
|
||||
CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.A [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||
PROPERTY name:a visibility:private modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
CONST String type=kotlin.String value="$"
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-a> visibility:private modality:FINAL <> ($this:<root>.A) returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY name:a visibility:private modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='private final fun <get-a> (): kotlin.String declared in <root>.A'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<get-a>' type=<root>.A origin=null
|
||||
PROPERTY name:b visibility:private modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:b type:kotlin.String visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="1234"
|
||||
CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null
|
||||
$this: CALL 'private final fun <get-a> (): kotlin.String declared in <root>.A' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR '<this>: <root>.A declared in <root>.A' type=<root>.A origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-b> visibility:private modality:FINAL <> ($this:<root>.A) returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY name:b visibility:private modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='private final fun <get-b> (): kotlin.String declared in <root>.A'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<get-b>' type=<root>.A origin=null
|
||||
PROPERTY name:c visibility:private modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.Int visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value=10000
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-c> visibility:private modality:FINAL <> ($this:<root>.A) returnType:kotlin.Int
|
||||
correspondingProperty: PROPERTY name:c visibility:private modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='private final fun <get-c> (): kotlin.Int declared in <root>.A'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<get-c>' type=<root>.A origin=null
|
||||
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
|
||||
$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 declared in kotlin.Any
|
||||
$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 declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
@@ -1,3 +1,5 @@
|
||||
// FIR_IDENTICAL
|
||||
|
||||
object A {
|
||||
private val a = "$"
|
||||
private val b = "1234$a"
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
fun foo(): String {
|
||||
return ""
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = 42
|
||||
get
|
||||
|
||||
val test1: String
|
||||
field = ""
|
||||
get
|
||||
|
||||
val test2: String
|
||||
field = "abc"
|
||||
get
|
||||
|
||||
val test3: String
|
||||
field = ""
|
||||
get
|
||||
|
||||
val test4: String
|
||||
field = "abc"
|
||||
get
|
||||
|
||||
val test5: String
|
||||
field = "\nabc\n"
|
||||
get
|
||||
|
||||
val test6: String
|
||||
field = <get-test1>().toString() + " " + foo().toString()
|
||||
get
|
||||
|
||||
val test7: String
|
||||
field = <get-test1>().toString()
|
||||
get
|
||||
|
||||
val test8: String
|
||||
field = foo().toString()
|
||||
get
|
||||
|
||||
val test9: String
|
||||
field = <get-x>().toString()
|
||||
get
|
||||
@@ -1,106 +0,0 @@
|
||||
FILE fqName:<root> fileName:/stringTemplates.kt
|
||||
FUN name:foo visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.String declared in <root>'
|
||||
CONST String type=kotlin.String value=""
|
||||
PROPERTY name:x visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value=42
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> () returnType:kotlin.Int
|
||||
correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-x> (): kotlin.Int declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final,static]' type=kotlin.Int origin=null
|
||||
PROPERTY name:test1 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.String visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
CONST String type=kotlin.String value=""
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test1> (): kotlin.String declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=null
|
||||
PROPERTY name:test2 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.String visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
CONST String type=kotlin.String value="abc"
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test2> (): kotlin.String declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=null
|
||||
PROPERTY name:test3 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test3 type:kotlin.String visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
CONST String type=kotlin.String value=""
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test3> visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test3> (): kotlin.String declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test3 type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=null
|
||||
PROPERTY name:test4 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test4 type:kotlin.String visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
CONST String type=kotlin.String value="abc"
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test4> visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test4> (): kotlin.String declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test4 type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=null
|
||||
PROPERTY name:test5 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test5 type:kotlin.String visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
CONST String type=kotlin.String value="\nabc\n"
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test5> visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY name:test5 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test5> (): kotlin.String declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test5 type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=null
|
||||
PROPERTY name:test6 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test6 type:kotlin.String visibility:private [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 <get-test1> (): kotlin.String declared in <root>' type=kotlin.String origin=GET_PROPERTY
|
||||
CONST String type=kotlin.String value=" "
|
||||
CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null
|
||||
$this: CALL 'public final fun foo (): kotlin.String declared in <root>' type=kotlin.String origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test6> visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY name:test6 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test6> (): kotlin.String declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test6 type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=null
|
||||
PROPERTY name:test7 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test7 type:kotlin.String visibility:private [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 <get-test1> (): kotlin.String declared in <root>' type=kotlin.String origin=GET_PROPERTY
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test7> visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY name:test7 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test7> (): kotlin.String declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test7 type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=null
|
||||
PROPERTY name:test8 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test8 type:kotlin.String visibility:private [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 foo (): kotlin.String declared in <root>' type=kotlin.String origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test8> visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test8> (): kotlin.String declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test8 type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=null
|
||||
PROPERTY name:test9 visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test9 type:kotlin.String visibility:private [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 <get-x> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test9> visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY name:test9 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test9> (): kotlin.String declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test9 type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=null
|
||||
@@ -1,3 +1,5 @@
|
||||
// FIR_IDENTICAL
|
||||
|
||||
fun foo(): String = ""
|
||||
val x = 42
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ class Flaf {
|
||||
var result: Flaf? = <this>.<get-INSTANCES>().get(key = javaName)
|
||||
when {
|
||||
EQEQ(arg0 = result, arg1 = null) -> { // BLOCK
|
||||
result = <this>.<get-INSTANCES>().get(key = javaName.toString() + "_alternative")
|
||||
result = <this>.<get-INSTANCES>().get(key = javaName + "_alternative")
|
||||
when {
|
||||
EQEQ(arg0 = result, arg1 = null) -> { // BLOCK
|
||||
result = Flaf(javaName = javaName)
|
||||
|
||||
@@ -50,8 +50,7 @@ FILE fqName:<root> fileName:/inapplicableCollectionSet.kt
|
||||
$this: CALL 'private final fun <get-INSTANCES> (): kotlin.collections.MutableMap<kotlin.String, <root>.Flaf> declared in <root>.Flaf' type=kotlin.collections.MutableMap<kotlin.String, <root>.Flaf> origin=GET_PROPERTY
|
||||
$this: GET_VAR '<this>: <root>.Flaf declared in <root>.Flaf.forJavaName' type=<root>.Flaf origin=null
|
||||
key: STRING_CONCATENATION type=kotlin.String
|
||||
CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null
|
||||
$this: GET_VAR 'javaName: kotlin.String declared in <root>.Flaf.forJavaName' type=kotlin.String origin=null
|
||||
GET_VAR 'javaName: kotlin.String declared in <root>.Flaf.forJavaName' type=kotlin.String origin=null
|
||||
CONST String type=kotlin.String value="_alternative"
|
||||
WHEN type=kotlin.Unit origin=IF
|
||||
BRANCH
|
||||
|
||||
@@ -4,7 +4,7 @@ fun box(): String {
|
||||
var i: Int = 0
|
||||
while (x.hasNext()) { // BLOCK
|
||||
when {
|
||||
ieee754equals(arg0 = a.get(index = i), arg1 = x.next()).not() -> return "Fail " + i.toString()
|
||||
ieee754equals(arg0 = a.get(index = i), arg1 = x.next()).not() -> return "Fail " + i
|
||||
}
|
||||
val <unary>: Int = i
|
||||
i = <unary>.inc()
|
||||
|
||||
@@ -25,8 +25,7 @@ FILE fqName:<root> fileName:/coercionInLoop.kt
|
||||
then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value="Fail "
|
||||
CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null
|
||||
$this: GET_VAR 'var i: kotlin.Int [var] declared in <root>.box' type=kotlin.Int origin=null
|
||||
GET_VAR 'var i: kotlin.Int [var] declared in <root>.box' type=kotlin.Int origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val]
|
||||
GET_VAR 'var i: kotlin.Int [var] declared in <root>.box' type=kotlin.Int origin=null
|
||||
SET_VAR 'var i: kotlin.Int [var] declared in <root>.box' type=kotlin.Unit origin=EQ
|
||||
|
||||
Reference in New Issue
Block a user