FIR2IR: insert coerce-to-unit expressions in statement containers

This commit is contained in:
Jinseong Jeon
2020-08-18 08:00:11 +03:00
committed by Mikhail Glukhikh
parent 1b3ab53e16
commit 7e22de1e24
52 changed files with 475 additions and 628 deletions
@@ -42,6 +42,7 @@ import org.jetbrains.kotlin.ir.expressions.*
import org.jetbrains.kotlin.ir.expressions.impl.*
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
import org.jetbrains.kotlin.ir.types.*
import org.jetbrains.kotlin.ir.util.coerceToUnitIfNeeded
import org.jetbrains.kotlin.ir.util.constructors
import org.jetbrains.kotlin.ir.util.defaultType
import org.jetbrains.kotlin.ir.util.parentClassOrNull
@@ -590,7 +591,7 @@ class Fir2IrVisitor(
} else {
emptyList()
}
)
).insertImplicitCasts()
}
}
@@ -608,16 +609,44 @@ class Fir2IrVisitor(
IrCompositeImpl(
startOffset, endOffset, type, origin,
mapToIrStatements().filterNotNull()
)
).insertImplicitCasts()
} else {
IrBlockImpl(
startOffset, endOffset, type, origin,
mapToIrStatements().filterNotNull()
)
).insertImplicitCasts()
}
}
}
private fun IrBlockBody.insertImplicitCasts(): IrBlockBody {
if (statements.isEmpty()) return this
statements.forEachIndexed { i, irStatement ->
if (irStatement !is IrErrorCallExpression && irStatement is IrExpression) {
statements[i] = irStatement.coerceToUnitIfNeeded(irStatement.type, irBuiltIns)
}
}
return this
}
private fun IrContainerExpression.insertImplicitCasts(): IrContainerExpression {
if (statements.isEmpty()) return this
val lastIndex = statements.lastIndex
statements.forEachIndexed { i, irStatement ->
if (irStatement !is IrErrorCallExpression && irStatement is IrExpression) {
if (i != lastIndex) {
statements[i] = irStatement.coerceToUnitIfNeeded(irStatement.type, irBuiltIns)
} else {
// TODO: for the last statement, need to cast to the return type if mismatched
}
}
}
return this
}
override fun visitErrorExpression(errorExpression: FirErrorExpression, data: Any?): IrElement {
return errorExpression.convertWithOffsets { startOffset, endOffset ->
IrErrorExpressionImpl(
@@ -1,6 +1,5 @@
// !LANGUAGE: +PolymorphicSignature
// TARGET_BACKEND: JVM
// IGNORE_BACKEND_FIR: JVM_IR
// FULL_JDK
// SKIP_JDK6
// WITH_RUNTIME
@@ -1,6 +1,5 @@
// !LANGUAGE: +PolymorphicSignature
// TARGET_BACKEND: JVM
// IGNORE_BACKEND_FIR: JVM_IR
// FULL_JDK
// SKIP_JDK6
// WITH_RUNTIME
@@ -15,7 +15,8 @@ FILE fqName:<root> fileName:/localDelegatedProperties.kt
SET_VAR 'var x: kotlin.Int? [var] declared in <root>.test2' type=kotlin.Unit origin=EQ
CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
SET_VAR 'var x: kotlin.Int? [var] declared in <root>.test2' type=kotlin.Unit origin=EQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: TYPE_OP type=kotlin.Int origin=IMPLICIT_CAST typeOperand=kotlin.Int
@@ -22,13 +22,14 @@ FILE fqName:<root> fileName:/useNextParamInLambda.kt
BLOCK_BODY
VAR name:result type:kotlin.String [var]
CONST String type=kotlin.String value="fail"
TRY type=kotlin.Any
try: CALL 'public final fun f (f1: kotlin.Function0<kotlin.String>, f2: kotlin.Function0<kotlin.String>): kotlin.String declared in <root>' type=kotlin.String origin=null
CATCH parameter=val e: java.lang.Exception [val] declared in <root>.box
VAR name:e type:java.lang.Exception [val]
BLOCK type=kotlin.Unit origin=null
SET_VAR 'var result: kotlin.String [var] declared in <root>.box' type=kotlin.Unit origin=EQ
CONST String type=kotlin.String value="OK"
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TRY type=kotlin.Any
try: CALL 'public final fun f (f1: kotlin.Function0<kotlin.String>, f2: kotlin.Function0<kotlin.String>): kotlin.String declared in <root>' type=kotlin.String origin=null
CATCH parameter=val e: java.lang.Exception [val] declared in <root>.box
VAR name:e type:java.lang.Exception [val]
BLOCK type=kotlin.Unit origin=null
SET_VAR 'var result: kotlin.String [var] declared in <root>.box' type=kotlin.Unit origin=EQ
CONST String type=kotlin.String value="OK"
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
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 f (f1: kotlin.Function0<kotlin.String>, f2: kotlin.Function0<kotlin.String>): kotlin.String declared in <root>' type=kotlin.String origin=null
@@ -88,4 +88,5 @@ FILE fqName:<root> fileName:/arrayAugmentedAssignment1.kt
index: CONST Int type=kotlin.Int value=0
value: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_4: kotlin.Int [val] declared in <root>.testMember' type=kotlin.Int origin=null
GET_VAR 'val tmp_4: kotlin.Int [val] declared in <root>.testMember' type=kotlin.Int origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
GET_VAR 'val tmp_4: kotlin.Int [val] declared in <root>.testMember' type=kotlin.Int origin=null
@@ -1,23 +0,0 @@
FILE fqName:<root> fileName:/booleanConstsInAndAndOrOr.kt
FUN name:test1 visibility:public modality:FINAL <> (b:kotlin.Boolean) returnType:kotlin.Unit
VALUE_PARAMETER name:b index:0 type:kotlin.Boolean
BLOCK_BODY
WHEN type=kotlin.Boolean origin=ANDAND
BRANCH
if: GET_VAR 'b: kotlin.Boolean declared in <root>.test1' type=kotlin.Boolean origin=null
then: RETURN type=kotlin.Nothing from='public final fun test1 (b: kotlin.Boolean): kotlin.Unit declared in <root>'
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Boolean type=kotlin.Boolean value=false
FUN name:test2 visibility:public modality:FINAL <> (b:kotlin.Boolean) returnType:kotlin.Unit
VALUE_PARAMETER name:b index:0 type:kotlin.Boolean
BLOCK_BODY
WHEN type=kotlin.Boolean origin=OROR
BRANCH
if: GET_VAR 'b: kotlin.Boolean declared in <root>.test2' type=kotlin.Boolean origin=null
then: CONST Boolean type=kotlin.Boolean value=true
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: RETURN type=kotlin.Nothing from='public final fun test2 (b: kotlin.Boolean): kotlin.Unit declared in <root>'
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun test1(b: Boolean) {
b && return
}
@@ -111,7 +111,8 @@ FILE fqName:<root> fileName:/breakContinueInLoopHeader.kt
SET_VAR 'var i: kotlin.Int [var] declared in <root>.test5' type=kotlin.Unit origin=EQ
CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_6: kotlin.Int [val] declared in <root>.test5' type=kotlin.Int origin=null
GET_VAR 'var i: kotlin.Int [var] declared in <root>.test5' type=kotlin.Int origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
GET_VAR 'var i: kotlin.Int [var] declared in <root>.test5' type=kotlin.Int origin=null
VAR name:j type:kotlin.Int [var]
CONST Int type=kotlin.Int value=0
DO_WHILE label=Inner origin=DO_WHILE_LOOP
@@ -114,7 +114,8 @@ FILE fqName:<root> fileName:/breakContinueInWhen.kt
SET_VAR 'var k: kotlin.Int [var] declared in <root>.testContinueDoWhile' type=kotlin.Unit origin=EQ
CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_2: kotlin.Int [val] 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
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
GET_VAR 'var k: kotlin.Int [var] declared in <root>.testContinueDoWhile' type=kotlin.Int origin=null
WHEN type=kotlin.Unit origin=WHEN
BRANCH
if: CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GT
@@ -170,8 +170,9 @@ FILE fqName:<root> fileName:/caoWithAdaptationForSam.kt
FUN name:test5 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:kotlin.Any
BLOCK_BODY
TYPE_OP type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=CAST typeOperand=kotlin.Function1<kotlin.Int, kotlin.Unit>
GET_VAR 'a: kotlin.Any declared in <root>.test5' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=CAST typeOperand=kotlin.Function1<kotlin.Int, kotlin.Unit>
GET_VAR 'a: kotlin.Any declared in <root>.test5' type=kotlin.Any origin=null
BLOCK type=kotlin.Unit origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_8 type:<root>.A [val]
GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.A
@@ -191,11 +192,13 @@ FILE fqName:<root> fileName:/caoWithAdaptationForSam.kt
FUN name:test6 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:kotlin.Any
BLOCK_BODY
TYPE_OP type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=CAST typeOperand=kotlin.Function1<kotlin.Int, kotlin.Unit>
GET_VAR 'a: kotlin.Any declared in <root>.test6' type=kotlin.Any origin=null
TYPE_OP type=<root>.IFoo origin=CAST typeOperand=<root>.IFoo
TYPE_OP type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=IMPLICIT_CAST typeOperand=kotlin.Function1<kotlin.Int, kotlin.Unit>
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=CAST typeOperand=kotlin.Function1<kotlin.Int, kotlin.Unit>
GET_VAR 'a: kotlin.Any declared in <root>.test6' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=<root>.IFoo origin=CAST typeOperand=<root>.IFoo
TYPE_OP type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=IMPLICIT_CAST typeOperand=kotlin.Function1<kotlin.Int, kotlin.Unit>
GET_VAR 'a: kotlin.Any declared in <root>.test6' type=kotlin.Any origin=null
BLOCK type=kotlin.Unit origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:<root>.A [val]
GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.A
@@ -20,13 +20,17 @@ FILE fqName:<root> fileName:/classReference.kt
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CLASS_REFERENCE 'CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.reflect.KClass<<root>.A>
GET_CLASS type=kotlin.reflect.KClass<<root>.A>
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.A' type=<root>.A origin=null
CALL 'public final fun <get-java> <T> (): java.lang.Class<T of kotlin.jvm.<get-java>> declared in kotlin.jvm' type=java.lang.Class<<root>.A> origin=GET_PROPERTY
<T>: <root>.A
$receiver: CLASS_REFERENCE 'CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.reflect.KClass<<root>.A>
CALL 'public final fun <get-java> <T> (): java.lang.Class<T of kotlin.jvm.<get-java>> declared in kotlin.jvm' type=java.lang.Class<<root>.A> origin=GET_PROPERTY
<T>: <root>.A
$receiver: GET_CLASS type=kotlin.reflect.KClass<<root>.A>
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CLASS_REFERENCE 'CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.reflect.KClass<<root>.A>
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
GET_CLASS type=kotlin.reflect.KClass<<root>.A>
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.A' type=<root>.A origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-java> <T> (): java.lang.Class<T of kotlin.jvm.<get-java>> declared in kotlin.jvm' type=java.lang.Class<<root>.A> origin=GET_PROPERTY
<T>: <root>.A
$receiver: CLASS_REFERENCE 'CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.reflect.KClass<<root>.A>
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-java> <T> (): java.lang.Class<T of kotlin.jvm.<get-java>> declared in kotlin.jvm' type=java.lang.Class<<root>.A> origin=GET_PROPERTY
<T>: <root>.A
$receiver: GET_CLASS type=kotlin.reflect.KClass<<root>.A>
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.A' type=<root>.A origin=null
@@ -15,36 +15,39 @@ FILE fqName:<root> fileName:/coercionToUnit.kt
FUN name:test2 visibility:public modality:FINAL <> (mc:kotlin.collections.MutableCollection<kotlin.String>) returnType:kotlin.Unit
VALUE_PARAMETER name:mc index:0 type:kotlin.collections.MutableCollection<kotlin.String>
BLOCK_BODY
CALL 'public abstract fun add (element: E of kotlin.collections.MutableCollection): kotlin.Boolean declared in kotlin.collections.MutableCollection' type=kotlin.Boolean origin=null
$this: GET_VAR 'mc: kotlin.collections.MutableCollection<kotlin.String> declared in <root>.test2' type=kotlin.collections.MutableCollection<kotlin.String> origin=null
element: CONST String type=kotlin.String value=""
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public abstract fun add (element: E of kotlin.collections.MutableCollection): kotlin.Boolean declared in kotlin.collections.MutableCollection' type=kotlin.Boolean origin=null
$this: GET_VAR 'mc: kotlin.collections.MutableCollection<kotlin.String> declared in <root>.test2' type=kotlin.collections.MutableCollection<kotlin.String> origin=null
element: CONST String type=kotlin.String value=""
FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
BLOCK type=kotlin.Unit? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:java.io.PrintStream? [val]
GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY
WHEN type=kotlin.Unit? origin=null
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_0: java.io.PrintStream? [val] declared in <root>.test3' type=java.io.PrintStream? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public open fun println (p0: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null
$this: GET_VAR 'val tmp_0: java.io.PrintStream? [val] declared in <root>.test3' type=java.io.PrintStream? origin=null
p0: CONST String type=kotlin.String value="Hello,"
BLOCK type=kotlin.Unit? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:java.io.PrintStream? [val]
GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY
WHEN type=kotlin.Unit? origin=null
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_1: java.io.PrintStream? [val] declared in <root>.test3' type=java.io.PrintStream? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public open fun println (p0: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null
$this: GET_VAR 'val tmp_1: java.io.PrintStream? [val] declared in <root>.test3' type=java.io.PrintStream? origin=null
p0: CONST String type=kotlin.String value="world!"
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
BLOCK type=kotlin.Unit? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:java.io.PrintStream? [val]
GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY
WHEN type=kotlin.Unit? origin=null
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_0: java.io.PrintStream? [val] declared in <root>.test3' type=java.io.PrintStream? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public open fun println (p0: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null
$this: GET_VAR 'val tmp_0: java.io.PrintStream? [val] declared in <root>.test3' type=java.io.PrintStream? origin=null
p0: CONST String type=kotlin.String value="Hello,"
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
BLOCK type=kotlin.Unit? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:java.io.PrintStream? [val]
GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY
WHEN type=kotlin.Unit? origin=null
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_1: java.io.PrintStream? [val] declared in <root>.test3' type=java.io.PrintStream? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public open fun println (p0: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null
$this: GET_VAR 'val tmp_1: java.io.PrintStream? [val] declared in <root>.test3' type=java.io.PrintStream? origin=null
p0: CONST String type=kotlin.String value="world!"
@@ -139,7 +139,8 @@ FILE fqName:<root> fileName:/complexAugmentedAssignment.kt
GET_VAR 'val tmp_2: kotlin.Int [val] declared in <root>.test1' type=kotlin.Int origin=null
value: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test1' type=kotlin.Int origin=null
GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test1' type=kotlin.Int origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test1' type=kotlin.Int origin=null
FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val]
@@ -149,7 +150,8 @@ FILE fqName:<root> fileName:/complexAugmentedAssignment.kt
$this: GET_OBJECT 'CLASS OBJECT name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.X1
<set-?>: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_3: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
GET_VAR 'val tmp_3: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
GET_VAR 'val tmp_3: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Int [val]
CALL 'public final fun <get-x2> (): kotlin.Int declared in <root>.X1.X2' type=kotlin.Int origin=GET_PROPERTY
$this: GET_OBJECT 'CLASS OBJECT name:X2 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.X1.X2
@@ -157,7 +159,8 @@ FILE fqName:<root> fileName:/complexAugmentedAssignment.kt
$this: GET_OBJECT 'CLASS OBJECT name:X2 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.X1.X2
<set-?>: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_4: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
GET_VAR 'val tmp_4: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
GET_VAR 'val tmp_4: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Int [val]
CALL 'public final fun <get-x3> (): kotlin.Int declared in <root>.X1.X2.X3' type=kotlin.Int origin=GET_PROPERTY
$this: GET_OBJECT 'CLASS OBJECT name:X3 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.X1.X2.X3
@@ -165,7 +168,8 @@ FILE fqName:<root> fileName:/complexAugmentedAssignment.kt
$this: GET_OBJECT 'CLASS OBJECT name:X3 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.X1.X2.X3
<set-?>: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
CLASS CLASS name:B modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.B
CONSTRUCTOR visibility:public <> (s:kotlin.Int) returnType:<root>.B [primary]
@@ -1,27 +0,0 @@
FILE fqName:<root> fileName:/castFromAny.kt
CLASS INTERFACE name:KRunnable modality:ABSTRACT visibility:public [fun] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.KRunnable
FUN name:invoke visibility:public modality:ABSTRACT <> ($this:<root>.KRunnable) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.KRunnable
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
FUN name:test visibility:public modality:FINAL <> (a:kotlin.Any?) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:kotlin.Any?
BLOCK_BODY
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=CAST typeOperand=kotlin.Function0<kotlin.Unit>
GET_VAR 'a: kotlin.Any? declared in <root>.test' type=kotlin.Any? origin=null
CALL 'public abstract fun invoke (): kotlin.Unit declared in <root>.KRunnable' type=kotlin.Unit origin=null
$this: TYPE_OP type=<root>.KRunnable origin=SAM_CONVERSION typeOperand=<root>.KRunnable
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=IMPLICIT_CAST typeOperand=kotlin.Function0<kotlin.Unit>
GET_VAR 'a: kotlin.Any? declared in <root>.test' type=kotlin.Any? origin=null
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
fun interface KRunnable {
@@ -136,27 +136,29 @@ FILE fqName:<root> fileName:/partialSam.kt
FUN name:test visibility:public modality:FINAL <> (j:<root>.J) returnType:kotlin.Unit
VALUE_PARAMETER name:j index:0 type:<root>.J
BLOCK_BODY
CALL 'public final fun runConversion (f1: <root>.Fn<kotlin.String, kotlin.Int>, f2: <root>.Fn<kotlin.Int, kotlin.String>): kotlin.Int declared in <root>.J' type=kotlin.Int origin=null
$this: GET_VAR 'j: <root>.J declared in <root>.test' type=<root>.J origin=null
f1: CALL 'public final fun <get-fsi> (): <root>.fsi.<no name provided> declared in <root>' type=<root>.fsi.<no name provided> origin=GET_PROPERTY
f2: TYPE_OP type=<root>.Fn<kotlin.Int, kotlin.String> origin=SAM_CONVERSION typeOperand=<root>.Fn<kotlin.Int, kotlin.String>
FUN_EXPR type=kotlin.Function3<kotlin.String, kotlin.Int, kotlin.Int, kotlin.String> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (s:kotlin.String, i:kotlin.Int, ti:kotlin.Int) returnType:kotlin.String
VALUE_PARAMETER name:s index:0 type:kotlin.String
VALUE_PARAMETER name:i index:1 type:kotlin.Int
VALUE_PARAMETER name:ti index:2 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (s: kotlin.String, i: kotlin.Int, ti: kotlin.Int): kotlin.String declared in <root>.test'
CONST String type=kotlin.String value=""
CALL 'public final fun runConversion (f1: <root>.Fn<kotlin.String, kotlin.Int>, f2: <root>.Fn<kotlin.Int, kotlin.String>): kotlin.Int declared in <root>.J' type=kotlin.Int origin=null
$this: GET_VAR 'j: <root>.J declared in <root>.test' type=<root>.J origin=null
f1: TYPE_OP type=<root>.Fn<kotlin.String, kotlin.Int> origin=SAM_CONVERSION typeOperand=<root>.Fn<kotlin.String, kotlin.Int>
FUN_EXPR type=kotlin.Function3<kotlin.String, kotlin.Int, kotlin.String, kotlin.Int> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (s:kotlin.String, i:kotlin.Int, ts:kotlin.String) returnType:kotlin.Int
VALUE_PARAMETER name:s index:0 type:kotlin.String
VALUE_PARAMETER name:i index:1 type:kotlin.Int
VALUE_PARAMETER name:ts index:2 type:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (s: kotlin.String, i: kotlin.Int, ts: kotlin.String): kotlin.Int declared in <root>.test'
CONST Int type=kotlin.Int value=1
f2: CALL 'public final fun <get-fis> (): <root>.fis.<no name provided> declared in <root>' type=<root>.fis.<no name provided> origin=GET_PROPERTY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun runConversion (f1: <root>.Fn<kotlin.String, kotlin.Int>, f2: <root>.Fn<kotlin.Int, kotlin.String>): kotlin.Int declared in <root>.J' type=kotlin.Int origin=null
$this: GET_VAR 'j: <root>.J declared in <root>.test' type=<root>.J origin=null
f1: CALL 'public final fun <get-fsi> (): <root>.fsi.<no name provided> declared in <root>' type=<root>.fsi.<no name provided> origin=GET_PROPERTY
f2: TYPE_OP type=<root>.Fn<kotlin.Int, kotlin.String> origin=SAM_CONVERSION typeOperand=<root>.Fn<kotlin.Int, kotlin.String>
FUN_EXPR type=kotlin.Function3<kotlin.String, kotlin.Int, kotlin.Int, kotlin.String> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (s:kotlin.String, i:kotlin.Int, ti:kotlin.Int) returnType:kotlin.String
VALUE_PARAMETER name:s index:0 type:kotlin.String
VALUE_PARAMETER name:i index:1 type:kotlin.Int
VALUE_PARAMETER name:ti index:2 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (s: kotlin.String, i: kotlin.Int, ti: kotlin.Int): kotlin.String declared in <root>.test'
CONST String type=kotlin.String value=""
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun runConversion (f1: <root>.Fn<kotlin.String, kotlin.Int>, f2: <root>.Fn<kotlin.Int, kotlin.String>): kotlin.Int declared in <root>.J' type=kotlin.Int origin=null
$this: GET_VAR 'j: <root>.J declared in <root>.test' type=<root>.J origin=null
f1: TYPE_OP type=<root>.Fn<kotlin.String, kotlin.Int> origin=SAM_CONVERSION typeOperand=<root>.Fn<kotlin.String, kotlin.Int>
FUN_EXPR type=kotlin.Function3<kotlin.String, kotlin.Int, kotlin.String, kotlin.Int> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (s:kotlin.String, i:kotlin.Int, ts:kotlin.String) returnType:kotlin.Int
VALUE_PARAMETER name:s index:0 type:kotlin.String
VALUE_PARAMETER name:i index:1 type:kotlin.Int
VALUE_PARAMETER name:ts index:2 type:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (s: kotlin.String, i: kotlin.Int, ts: kotlin.String): kotlin.Int declared in <root>.test'
CONST Int type=kotlin.Int value=1
f2: CALL 'public final fun <get-fis> (): <root>.fis.<no name provided> declared in <root>' type=<root>.fis.<no name provided> origin=GET_PROPERTY
@@ -48,8 +48,9 @@ FILE fqName:<root> fileName:/samConversionsWithSmartCasts.kt
FUN name:test2 visibility:public modality:FINAL <> (a:<root>.KRunnable) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:<root>.KRunnable
BLOCK_BODY
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=CAST typeOperand=kotlin.Function0<kotlin.Unit>
GET_VAR 'a: <root>.KRunnable declared in <root>.test2' type=<root>.KRunnable origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=CAST typeOperand=kotlin.Function0<kotlin.Unit>
GET_VAR 'a: <root>.KRunnable declared in <root>.test2' type=<root>.KRunnable origin=null
CALL 'public final fun run1 (r: <root>.KRunnable): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
r: TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=IMPLICIT_CAST typeOperand=kotlin.Function0<kotlin.Unit>
GET_VAR 'a: <root>.KRunnable declared in <root>.test2' type=<root>.KRunnable origin=null
@@ -96,17 +97,19 @@ FILE fqName:<root> fileName:/samConversionsWithSmartCasts.kt
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=<root>.KRunnable
GET_VAR 'a: kotlin.Any declared in <root>.test5x' type=kotlin.Any origin=null
then: BLOCK type=kotlin.Unit origin=null
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=CAST typeOperand=kotlin.Function0<kotlin.Unit>
TYPE_OP type=<root>.KRunnable origin=IMPLICIT_CAST typeOperand=<root>.KRunnable
GET_VAR 'a: kotlin.Any declared in <root>.test5x' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=CAST typeOperand=kotlin.Function0<kotlin.Unit>
TYPE_OP type=<root>.KRunnable origin=IMPLICIT_CAST typeOperand=<root>.KRunnable
GET_VAR 'a: kotlin.Any declared in <root>.test5x' type=kotlin.Any origin=null
CALL 'public final fun run1 (r: <root>.KRunnable): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
r: TYPE_OP type=<root>.KRunnable origin=IMPLICIT_CAST typeOperand=<root>.KRunnable
GET_VAR 'a: kotlin.Any declared in <root>.test5x' type=kotlin.Any origin=null
FUN name:test6 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:kotlin.Any
BLOCK_BODY
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=CAST typeOperand=kotlin.Function0<kotlin.Unit>
GET_VAR 'a: kotlin.Any declared in <root>.test6' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=CAST typeOperand=kotlin.Function0<kotlin.Unit>
GET_VAR 'a: kotlin.Any declared in <root>.test6' type=kotlin.Any origin=null
CALL 'public final fun run1 (r: <root>.KRunnable): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
r: TYPE_OP type=<root>.KRunnable origin=SAM_CONVERSION typeOperand=<root>.KRunnable
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=IMPLICIT_CAST typeOperand=kotlin.Function0<kotlin.Unit>
+24 -21
View File
@@ -23,13 +23,14 @@ FILE fqName:<root> fileName:/ifElseIf.kt
FUN name:testEmptyBranches1 visibility:public modality:FINAL <> (flag:kotlin.Boolean) returnType:kotlin.Unit
VALUE_PARAMETER name:flag index:0 type:kotlin.Boolean
BLOCK_BODY
WHEN type=kotlin.Any origin=IF
BRANCH
if: GET_VAR 'flag: kotlin.Boolean declared in <root>.testEmptyBranches1' type=kotlin.Boolean origin=null
then: BLOCK type=kotlin.Unit origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Boolean type=kotlin.Boolean value=true
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
WHEN type=kotlin.Any origin=IF
BRANCH
if: GET_VAR 'flag: kotlin.Boolean declared in <root>.testEmptyBranches1' type=kotlin.Boolean origin=null
then: BLOCK type=kotlin.Unit origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Boolean type=kotlin.Boolean value=true
WHEN type=kotlin.Unit origin=IF
BRANCH
if: GET_VAR 'flag: kotlin.Boolean declared in <root>.testEmptyBranches1' type=kotlin.Boolean origin=null
@@ -37,13 +38,14 @@ FILE fqName:<root> fileName:/ifElseIf.kt
FUN name:testEmptyBranches2 visibility:public modality:FINAL <> (flag:kotlin.Boolean) returnType:kotlin.Unit
VALUE_PARAMETER name:flag index:0 type:kotlin.Boolean
BLOCK_BODY
WHEN type=kotlin.Any origin=IF
BRANCH
if: GET_VAR 'flag: kotlin.Boolean declared in <root>.testEmptyBranches2' type=kotlin.Boolean origin=null
then: BLOCK type=kotlin.Unit origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Boolean type=kotlin.Boolean value=true
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
WHEN type=kotlin.Any origin=IF
BRANCH
if: GET_VAR 'flag: kotlin.Boolean declared in <root>.testEmptyBranches2' type=kotlin.Boolean origin=null
then: BLOCK type=kotlin.Unit origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Boolean type=kotlin.Boolean value=true
WHEN type=kotlin.Unit origin=IF
BRANCH
if: GET_VAR 'flag: kotlin.Boolean declared in <root>.testEmptyBranches2' type=kotlin.Boolean origin=null
@@ -51,10 +53,11 @@ FILE fqName:<root> fileName:/ifElseIf.kt
FUN name:testEmptyBranches3 visibility:public modality:FINAL <> (flag:kotlin.Boolean) returnType:kotlin.Unit
VALUE_PARAMETER name:flag index:0 type:kotlin.Boolean
BLOCK_BODY
WHEN type=kotlin.Any origin=IF
BRANCH
if: GET_VAR 'flag: kotlin.Boolean declared in <root>.testEmptyBranches3' type=kotlin.Boolean origin=null
then: BLOCK type=kotlin.Unit origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Boolean type=kotlin.Boolean value=true
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
WHEN type=kotlin.Any origin=IF
BRANCH
if: GET_VAR 'flag: kotlin.Boolean declared in <root>.testEmptyBranches3' type=kotlin.Boolean origin=null
then: BLOCK type=kotlin.Unit origin=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Boolean type=kotlin.Boolean value=true
@@ -55,8 +55,9 @@ FILE fqName:<root> fileName:/implicitCastToTypeParameter.kt
$this: VALUE_PARAMETER name:<this> type:<root>.Bar<T of <root>.Bar>
VALUE_PARAMETER name:arg index:0 type:kotlin.Any
BLOCK_BODY
TYPE_OP type=T of <root>.Bar origin=CAST typeOperand=T of <root>.Bar
GET_VAR 'arg: kotlin.Any declared in <root>.Bar.test' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=T of <root>.Bar origin=CAST typeOperand=T of <root>.Bar
GET_VAR 'arg: kotlin.Any declared in <root>.Bar.test' type=kotlin.Any origin=null
CALL 'public final fun useT (t: T of <root>.Bar): kotlin.Unit declared in <root>.Bar' type=kotlin.Unit origin=null
$this: GET_VAR '<this>: <root>.Bar<T of <root>.Bar> declared in <root>.Bar.test' type=<root>.Bar<T of <root>.Bar> origin=null
t: TYPE_OP type=T of <root>.Bar origin=IMPLICIT_CAST typeOperand=T of <root>.Bar
@@ -3,8 +3,9 @@ FILE fqName:<root> fileName:/javaSyntheticGenericPropertyAccess.kt
TYPE_PARAMETER name:F index:0 variance: superTypes:[kotlin.Any?]
VALUE_PARAMETER name:j index:0 type:<root>.J<F of <root>.test>
BLOCK_BODY
CALL 'public open fun getFoo (): kotlin.Int declared in <root>.J' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'j: <root>.J<F of <root>.test> declared in <root>.test' type=<root>.J<F of <root>.test> origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public open fun getFoo (): kotlin.Int declared in <root>.J' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'j: <root>.J<F of <root>.test> declared in <root>.test' type=<root>.J<F of <root>.test> origin=null
CALL 'public open fun setFoo (x: kotlin.Int): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=EQ
$this: GET_VAR 'j: <root>.J<F of <root>.test> declared in <root>.test' type=<root>.J<F of <root>.test> origin=null
x: CONST Int type=kotlin.Int value=1
@@ -15,7 +16,8 @@ FILE fqName:<root> fileName:/javaSyntheticGenericPropertyAccess.kt
$this: GET_VAR 'j: <root>.J<F of <root>.test> declared in <root>.test' type=<root>.J<F of <root>.test> origin=null
x: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
CALL 'public open fun setFoo (x: kotlin.Int): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=EQ
$this: GET_VAR 'j: <root>.J<F of <root>.test> declared in <root>.test' type=<root>.J<F of <root>.test> origin=null
x: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
@@ -2,8 +2,9 @@ FILE fqName:<root> fileName:/javaSyntheticPropertyAccess.kt
FUN name:test visibility:public modality:FINAL <> (j:<root>.J) returnType:kotlin.Unit
VALUE_PARAMETER name:j index:0 type:<root>.J
BLOCK_BODY
CALL 'public open fun getFoo (): kotlin.Int declared in <root>.J' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'j: <root>.J declared in <root>.test' type=<root>.J origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public open fun getFoo (): kotlin.Int declared in <root>.J' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'j: <root>.J declared in <root>.test' type=<root>.J origin=null
CALL 'public open fun setFoo (x: kotlin.Int): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=EQ
$this: GET_VAR 'j: <root>.J declared in <root>.test' type=<root>.J origin=null
x: CONST Int type=kotlin.Int value=1
@@ -14,7 +15,8 @@ FILE fqName:<root> fileName:/javaSyntheticPropertyAccess.kt
$this: GET_VAR 'j: <root>.J declared in <root>.test' type=<root>.J origin=null
x: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
CALL 'public open fun setFoo (x: kotlin.Int): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=EQ
$this: GET_VAR 'j: <root>.J declared in <root>.test' type=<root>.J origin=null
x: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
@@ -127,8 +127,9 @@ FILE fqName:<root> fileName:/jvmFieldWithIntersectionTypes.kt
SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:f type:kotlin.Int visibility:public' type=kotlin.Unit origin=EQ
receiver: GET_VAR 'val k: <root>.JFieldOwner [val] declared in <root>.test' type=<root>.JFieldOwner origin=null
value: CONST Int type=kotlin.Int value=42
GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:f type:kotlin.Int visibility:public' type=kotlin.Int origin=GET_PROPERTY
receiver: GET_VAR 'val k: <root>.JFieldOwner [val] declared in <root>.test' type=<root>.JFieldOwner origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:f type:kotlin.Int visibility:public' type=kotlin.Int origin=GET_PROPERTY
receiver: GET_VAR 'val k: <root>.JFieldOwner [val] declared in <root>.test' type=<root>.JFieldOwner origin=null
VAR name:md1 type:<root>.DerivedThroughMid1 [val]
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.DerivedThroughMid1' type=<root>.DerivedThroughMid1 origin=null
VAR name:md2 type:<root>.DerivedThroughMid2 [val]
@@ -144,5 +145,6 @@ FILE fqName:<root> fileName:/jvmFieldWithIntersectionTypes.kt
SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:f type:kotlin.Int visibility:public' type=kotlin.Unit origin=EQ
receiver: GET_VAR 'val mk: <root>.Mid [val] declared in <root>.test' type=<root>.Mid origin=null
value: CONST Int type=kotlin.Int value=44
GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:f type:kotlin.Int visibility:public' type=kotlin.Int origin=GET_PROPERTY
receiver: GET_VAR 'val mk: <root>.Mid [val] declared in <root>.test' type=<root>.Mid origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:f type:kotlin.Int visibility:public' type=kotlin.Int origin=GET_PROPERTY
receiver: GET_VAR 'val mk: <root>.Mid [val] declared in <root>.test' type=<root>.Mid origin=null
+11 -10
View File
@@ -20,16 +20,17 @@ FILE fqName:<root> fileName:/kt37570.kt
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<get-b>' type=<root>.A origin=null
ANONYMOUS_INITIALIZER isStatic=false
BLOCK_BODY
CALL 'public final fun apply <T> (block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.apply, kotlin.Unit>): T of kotlin.apply [inline] declared in kotlin' type=kotlin.String origin=null
<T>: kotlin.String
$receiver: CALL 'public final fun a (): kotlin.String declared in <root>' type=kotlin.String origin=null
block: FUN_EXPR type=kotlin.Function1<kotlin.String, kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:kotlin.String) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:<this> type:kotlin.String
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:kotlin.String visibility:private [final]' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A' type=<root>.A origin=null
value: GET_VAR '<this>: kotlin.String declared in <root>.A.<anonymous>' type=kotlin.String origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun apply <T> (block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.apply, kotlin.Unit>): T of kotlin.apply [inline] declared in kotlin' type=kotlin.String origin=null
<T>: kotlin.String
$receiver: CALL 'public final fun a (): kotlin.String declared in <root>' type=kotlin.String origin=null
block: FUN_EXPR type=kotlin.Function1<kotlin.String, kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:kotlin.String) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:<this> type:kotlin.String
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:kotlin.String visibility:private [final]' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A' type=<root>.A origin=null
value: GET_VAR '<this>: kotlin.String declared in <root>.A.<anonymous>' type=kotlin.String 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
@@ -48,4 +48,5 @@ FILE fqName:<root> fileName:/lambdaInCAO.kt
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
value: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test3' type=kotlin.Int origin=null
GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test3' type=kotlin.Int origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test3' type=kotlin.Int origin=null
@@ -1,26 +0,0 @@
FILE fqName:<root> fileName:/objectClassReference.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]'
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
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
CLASS_REFERENCE 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.reflect.KClass<<root>.A>
CALL 'public final fun <get-java> <T> (): java.lang.Class<T of kotlin.jvm.<get-java>> declared in kotlin.jvm' type=java.lang.Class<<root>.A> origin=GET_PROPERTY
<T>: <root>.A
$receiver: CLASS_REFERENCE 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.reflect.KClass<<root>.A>
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
//WITH_RUNTIME
object A
@@ -41,17 +41,18 @@ FILE fqName:<root> fileName:/safeAssignment.kt
FUN name:test visibility:public modality:FINAL <> (nc:<root>.C?) returnType:kotlin.Unit
VALUE_PARAMETER name:nc index:0 type:<root>.C?
BLOCK_BODY
BLOCK type=kotlin.Unit? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.C? [val]
GET_VAR 'nc: <root>.C? declared in <root>.test' type=<root>.C? origin=null
WHEN type=kotlin.Unit? origin=null
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_0: <root>.C? [val] declared in <root>.test' type=<root>.C? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public final fun <set-x> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.C' type=kotlin.Unit origin=EQ
$this: GET_VAR 'val tmp_0: <root>.C? [val] declared in <root>.test' type=<root>.C? origin=null
<set-?>: CONST Int type=kotlin.Int value=42
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
BLOCK type=kotlin.Unit? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.C? [val]
GET_VAR 'nc: <root>.C? declared in <root>.test' type=<root>.C? origin=null
WHEN type=kotlin.Unit? origin=null
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_0: <root>.C? [val] declared in <root>.test' type=<root>.C? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public final fun <set-x> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.C' type=kotlin.Unit origin=EQ
$this: GET_VAR 'val tmp_0: <root>.C? [val] declared in <root>.test' type=<root>.C? origin=null
<set-?>: CONST Int type=kotlin.Int value=42
@@ -75,22 +75,24 @@ FILE fqName:test fileName:/safeCallWithIncrementDecrement.kt
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public final fun <get-p> (): kotlin.Int declared in test' type=kotlin.Int origin=GET_PROPERTY
$receiver: GET_VAR 'val tmp_2: test.C? [val] declared in test.testProperty' type=test.C? origin=null
BLOCK type=kotlin.Unit? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:test.C? [val]
GET_VAR 'nc: test.C? declared in test.testProperty' type=test.C? origin=null
WHEN type=kotlin.Unit? origin=null
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: test.C? [val] declared in test.testProperty' type=test.C? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public final fun <set-p> (value: kotlin.Int): kotlin.Unit declared in test' type=kotlin.Unit origin=EQ
$receiver: GET_VAR 'val tmp_3: test.C? [val] declared in test.testProperty' type=test.C? origin=null
value: CALL 'public final fun inc (): kotlin.Int? [operator] declared in test' type=kotlin.Int? origin=null
$receiver: GET_VAR 'val tmp_1: kotlin.Int? [val] declared in test.testProperty' type=kotlin.Int? origin=null
GET_VAR 'val tmp_1: kotlin.Int? [val] declared in test.testProperty' type=kotlin.Int? origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
BLOCK type=kotlin.Unit? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:test.C? [val]
GET_VAR 'nc: test.C? declared in test.testProperty' type=test.C? origin=null
WHEN type=kotlin.Unit? origin=null
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: test.C? [val] declared in test.testProperty' type=test.C? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public final fun <set-p> (value: kotlin.Int): kotlin.Unit declared in test' type=kotlin.Unit origin=EQ
$receiver: GET_VAR 'val tmp_3: test.C? [val] declared in test.testProperty' type=test.C? origin=null
value: CALL 'public final fun inc (): kotlin.Int? [operator] declared in test' type=kotlin.Int? origin=null
$receiver: GET_VAR 'val tmp_1: kotlin.Int? [val] declared in test.testProperty' type=kotlin.Int? origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
GET_VAR 'val tmp_1: kotlin.Int? [val] declared in test.testProperty' type=kotlin.Int? origin=null
FUN name:testArrayAccess visibility:public modality:FINAL <> (nc:test.C?) returnType:kotlin.Unit
VALUE_PARAMETER name:nc index:0 type:test.C?
BLOCK_BODY
@@ -127,4 +129,5 @@ FILE fqName:test fileName:/safeCallWithIncrementDecrement.kt
index: CONST Int type=kotlin.Int value=0
value: CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_4: kotlin.Int [val] declared in test.testArrayAccess' type=kotlin.Int origin=null
GET_VAR 'val tmp_4: kotlin.Int [val] declared in test.testArrayAccess' type=kotlin.Int origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
GET_VAR 'val tmp_4: kotlin.Int [val] declared in test.testArrayAccess' type=kotlin.Int origin=null
+29 -27
View File
@@ -116,20 +116,21 @@ FILE fqName:<root> fileName:/safeCalls.kt
FUN name:test4 visibility:public modality:FINAL <> (x:<root>.Ref?) returnType:kotlin.Unit
VALUE_PARAMETER name:x index:0 type:<root>.Ref?
BLOCK_BODY
BLOCK type=kotlin.Unit? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:<root>.Ref? [val]
GET_VAR 'x: <root>.Ref? declared in <root>.test4' type=<root>.Ref? origin=null
WHEN type=kotlin.Unit? origin=null
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: <root>.Ref? [val] declared in <root>.test4' type=<root>.Ref? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public final fun <set-value> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Ref' type=kotlin.Unit origin=EQ
$this: GET_VAR 'val tmp_3: <root>.Ref? [val] declared in <root>.test4' type=<root>.Ref? origin=null
<set-?>: CONST Int type=kotlin.Int value=0
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
BLOCK type=kotlin.Unit? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:<root>.Ref? [val]
GET_VAR 'x: <root>.Ref? declared in <root>.test4' type=<root>.Ref? origin=null
WHEN type=kotlin.Unit? origin=null
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: <root>.Ref? [val] declared in <root>.test4' type=<root>.Ref? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public final fun <set-value> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Ref' type=kotlin.Unit origin=EQ
$this: GET_VAR 'val tmp_3: <root>.Ref? [val] declared in <root>.test4' type=<root>.Ref? origin=null
<set-?>: CONST Int type=kotlin.Int value=0
FUN name:test5 visibility:public modality:FINAL <> ($receiver:<root>.IHost, s:kotlin.String?) returnType:kotlin.Int?
$receiver: VALUE_PARAMETER name:<this> type:<root>.IHost
VALUE_PARAMETER name:s index:0 type:kotlin.String?
@@ -156,16 +157,17 @@ FILE fqName:<root> fileName:/safeCalls.kt
CONST Int type=kotlin.Int value=239
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
BLOCK type=kotlin.Int origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=42
WHEN type=kotlin.Int origin=null
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_5: kotlin.Int [val] declared in <root>.box' type=kotlin.Int origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public final fun foo (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
$receiver: GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.box' type=kotlin.Int origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
BLOCK type=kotlin.Int origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Int [val]
CONST Int type=kotlin.Int value=42
WHEN type=kotlin.Int origin=null
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_5: kotlin.Int [val] declared in <root>.box' type=kotlin.Int origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public final fun foo (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
$receiver: GET_VAR 'val tmp_5: kotlin.Int [val] declared in <root>.box' type=kotlin.Int origin=null
@@ -11,43 +11,48 @@ FILE fqName:<root> fileName:/arrayAsVarargAfterSamArgument.kt
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Unit declared in <root>.test'
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
GET_VAR 'arr: kotlin.Array<kotlin.String> declared in <root>.test' type=kotlin.Array<kotlin.String> origin=null
CALL 'public open fun foo1 (r: java.lang.Runnable?, vararg strs: kotlin.String?): kotlin.String? declared in <root>.Test' type=kotlin.String? origin=null
r: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable?
FUN_EXPR type=kotlin.Function0<kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Unit declared in <root>.test'
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
strs: VARARG type=kotlin.Array<out kotlin.String?>? varargElementType=kotlin.String?
SPREAD_ELEMENT
GET_VAR 'arr: kotlin.Array<kotlin.String> declared in <root>.test' type=kotlin.Array<kotlin.String> origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public open fun foo1 (r: java.lang.Runnable?, vararg strs: kotlin.String?): kotlin.String? declared in <root>.Test' type=kotlin.String? origin=null
r: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable?
FUN_EXPR type=kotlin.Function0<kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Unit declared in <root>.test'
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
strs: VARARG type=kotlin.Array<out kotlin.String?>? varargElementType=kotlin.String?
SPREAD_ELEMENT
GET_VAR 'arr: kotlin.Array<kotlin.String> declared in <root>.test' type=kotlin.Array<kotlin.String> origin=null
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): /Test.foo1>#' type=kotlin.String?
GET_VAR 'fn: kotlin.Function0<kotlin.Unit> declared in <root>.test' type=kotlin.Function0<kotlin.Unit> origin=null
GET_VAR 'arr: kotlin.Array<kotlin.String> declared in <root>.test' type=kotlin.Array<kotlin.String> origin=null
CALL 'public open fun foo1 (r: java.lang.Runnable?, vararg strs: kotlin.String?): kotlin.String? declared in <root>.Test' type=kotlin.String? origin=null
r: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable?
GET_VAR 'fn: kotlin.Function0<kotlin.Unit> declared in <root>.test' type=kotlin.Function0<kotlin.Unit> origin=null
strs: VARARG type=kotlin.Array<out kotlin.String?>? varargElementType=kotlin.String?
SPREAD_ELEMENT
GET_VAR 'arr: kotlin.Array<kotlin.String> declared in <root>.test' type=kotlin.Array<kotlin.String> origin=null
CALL 'public open fun foo1 (r: java.lang.Runnable?, vararg strs: kotlin.String?): kotlin.String? declared in <root>.Test' type=kotlin.String? origin=null
r: GET_VAR 'r: java.lang.Runnable declared in <root>.test' type=java.lang.Runnable origin=null
strs: VARARG type=kotlin.Array<out kotlin.String?>? varargElementType=kotlin.String?
CONST String type=kotlin.String value=""
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public open fun foo1 (r: java.lang.Runnable?, vararg strs: kotlin.String?): kotlin.String? declared in <root>.Test' type=kotlin.String? origin=null
r: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable?
GET_VAR 'fn: kotlin.Function0<kotlin.Unit> declared in <root>.test' type=kotlin.Function0<kotlin.Unit> origin=null
strs: VARARG type=kotlin.Array<out kotlin.String?>? varargElementType=kotlin.String?
SPREAD_ELEMENT
GET_VAR 'arr: kotlin.Array<kotlin.String> declared in <root>.test' type=kotlin.Array<kotlin.String> origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public open fun foo1 (r: java.lang.Runnable?, vararg strs: kotlin.String?): kotlin.String? declared in <root>.Test' type=kotlin.String? origin=null
r: GET_VAR 'r: java.lang.Runnable declared in <root>.test' type=java.lang.Runnable origin=null
strs: VARARG type=kotlin.Array<out kotlin.String?>? varargElementType=kotlin.String?
CONST String type=kotlin.String value=""
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): /Test.foo1>#' type=kotlin.String?
GET_VAR 'fn: kotlin.Function0<kotlin.Unit> declared in <root>.test' type=kotlin.Function0<kotlin.Unit> origin=null
GET_VAR 'arr: kotlin.Array<kotlin.String> declared in <root>.test' type=kotlin.Array<kotlin.String> origin=null
CALL 'public open fun foo1 (r: java.lang.Runnable?, vararg strs: kotlin.String?): kotlin.String? declared in <root>.Test' type=kotlin.String? origin=null
r: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable?
GET_VAR 'fn: kotlin.Function0<kotlin.Unit> declared in <root>.test' type=kotlin.Function0<kotlin.Unit> origin=null
strs: VARARG type=kotlin.Array<out kotlin.String?>? varargElementType=kotlin.String?
SPREAD_ELEMENT
GET_VAR 'arr: kotlin.Array<kotlin.String> declared in <root>.test' type=kotlin.Array<kotlin.String> origin=null
CALL 'public open fun foo1 (r: java.lang.Runnable?, vararg strs: kotlin.String?): kotlin.String? declared in <root>.Test' type=kotlin.String? origin=null
r: GET_VAR 'r: java.lang.Runnable declared in <root>.test' type=java.lang.Runnable origin=null
strs: VARARG type=kotlin.Array<out kotlin.String?>? varargElementType=kotlin.String?
SPREAD_ELEMENT
GET_VAR 'arr: kotlin.Array<kotlin.String> declared in <root>.test' type=kotlin.Array<kotlin.String> origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public open fun foo1 (r: java.lang.Runnable?, vararg strs: kotlin.String?): kotlin.String? declared in <root>.Test' type=kotlin.String? origin=null
r: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable?
GET_VAR 'fn: kotlin.Function0<kotlin.Unit> declared in <root>.test' type=kotlin.Function0<kotlin.Unit> origin=null
strs: VARARG type=kotlin.Array<out kotlin.String?>? varargElementType=kotlin.String?
SPREAD_ELEMENT
GET_VAR 'arr: kotlin.Array<kotlin.String> declared in <root>.test' type=kotlin.Array<kotlin.String> origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public open fun foo1 (r: java.lang.Runnable?, vararg strs: kotlin.String?): kotlin.String? declared in <root>.Test' type=kotlin.String? origin=null
r: GET_VAR 'r: java.lang.Runnable declared in <root>.test' type=java.lang.Runnable origin=null
strs: VARARG type=kotlin.Array<out kotlin.String?>? varargElementType=kotlin.String?
SPREAD_ELEMENT
GET_VAR 'arr: kotlin.Array<kotlin.String> declared in <root>.test' type=kotlin.Array<kotlin.String> origin=null
VAR name:i1 type:IrErrorType [val]
ERROR_CALL 'Unresolved reference: <Ambiguity: Test, [/Test.Test, /Test.Test]>#' type=IrErrorType
FUN_EXPR type=kotlin.Function0<kotlin.Unit> origin=LAMBDA
@@ -10,10 +10,12 @@ FILE fqName:<root> fileName:/samConversionInGenericConstructorCall.kt
FUN name:test2 visibility:public modality:FINAL <> (x:kotlin.Any) returnType:kotlin.Unit
VALUE_PARAMETER name:x index:0 type:kotlin.Any
BLOCK_BODY
TYPE_OP type=kotlin.Function1<kotlin.String, kotlin.String> origin=CAST typeOperand=kotlin.Function1<kotlin.String, kotlin.String>
GET_VAR 'x: kotlin.Any declared in <root>.test2' type=kotlin.Any origin=null
CONSTRUCTOR_CALL 'public constructor <init> (jxx: <root>.J<X of <root>.C?, X of <root>.C?>?) declared in <root>.C' type=<root>.C<kotlin.String?> origin=null
<class: X>: kotlin.String?
jxx: TYPE_OP type=<root>.J<X of <root>.C?, X of <root>.C?>? origin=SAM_CONVERSION typeOperand=<root>.J<X of <root>.C?, X of <root>.C?>?
TYPE_OP type=kotlin.Function1<kotlin.String, kotlin.String> origin=IMPLICIT_CAST typeOperand=kotlin.Function1<kotlin.String, kotlin.String>
GET_VAR 'x: kotlin.Any declared in <root>.test2' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=kotlin.Function1<kotlin.String, kotlin.String> origin=CAST typeOperand=kotlin.Function1<kotlin.String, kotlin.String>
GET_VAR 'x: kotlin.Any declared in <root>.test2' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CONSTRUCTOR_CALL 'public constructor <init> (jxx: <root>.J<X of <root>.C?, X of <root>.C?>?) declared in <root>.C' type=<root>.C<kotlin.String?> origin=null
<class: X>: kotlin.String?
jxx: TYPE_OP type=<root>.J<X of <root>.C?, X of <root>.C?>? origin=SAM_CONVERSION typeOperand=<root>.J<X of <root>.C?, X of <root>.C?>?
TYPE_OP type=kotlin.Function1<kotlin.String, kotlin.String> origin=IMPLICIT_CAST typeOperand=kotlin.Function1<kotlin.String, kotlin.String>
GET_VAR 'x: kotlin.Any declared in <root>.test2' type=kotlin.Any origin=null
@@ -102,11 +102,13 @@ FILE fqName:<root> fileName:/samConversionInGenericConstructorCall_NI.kt
FUN name:testGenericJavaCtor2 visibility:public modality:FINAL <> (x:kotlin.Any) returnType:kotlin.Unit
VALUE_PARAMETER name:x index:0 type:kotlin.Any
BLOCK_BODY
TYPE_OP type=kotlin.Function1<kotlin.String, kotlin.Int> origin=CAST typeOperand=kotlin.Function1<kotlin.String, kotlin.Int>
GET_VAR 'x: kotlin.Any declared in <root>.testGenericJavaCtor2' type=kotlin.Any origin=null
CONSTRUCTOR_CALL 'public constructor <init> <TCtor> (x: <root>.J<TCtor of <root>.G.<init>?, TClass of <root>.G?>?) declared in <root>.G' type=<root>.G<kotlin.String?> origin=null
<class: TClass>: kotlin.String?
<TCtor>: kotlin.Int?
x: TYPE_OP type=<root>.J<TCtor of <root>.G.<init>?, TClass of <root>.G?>? origin=SAM_CONVERSION typeOperand=<root>.J<TCtor of <root>.G.<init>?, TClass of <root>.G?>?
TYPE_OP type=kotlin.Function1<kotlin.String, kotlin.Int> origin=IMPLICIT_CAST typeOperand=kotlin.Function1<kotlin.String, kotlin.Int>
GET_VAR 'x: kotlin.Any declared in <root>.testGenericJavaCtor2' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=kotlin.Function1<kotlin.String, kotlin.Int> origin=CAST typeOperand=kotlin.Function1<kotlin.String, kotlin.Int>
GET_VAR 'x: kotlin.Any declared in <root>.testGenericJavaCtor2' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CONSTRUCTOR_CALL 'public constructor <init> <TCtor> (x: <root>.J<TCtor of <root>.G.<init>?, TClass of <root>.G?>?) declared in <root>.G' type=<root>.G<kotlin.String?> origin=null
<class: TClass>: kotlin.String?
<TCtor>: kotlin.Int?
x: TYPE_OP type=<root>.J<TCtor of <root>.G.<init>?, TClass of <root>.G?>? origin=SAM_CONVERSION typeOperand=<root>.J<TCtor of <root>.G.<init>?, TClass of <root>.G?>?
TYPE_OP type=kotlin.Function1<kotlin.String, kotlin.Int> origin=IMPLICIT_CAST typeOperand=kotlin.Function1<kotlin.String, kotlin.Int>
GET_VAR 'x: kotlin.Any declared in <root>.testGenericJavaCtor2' type=kotlin.Any origin=null
@@ -34,8 +34,9 @@ FILE fqName:<root> fileName:/samConversionToGeneric.kt
FUN name:test4 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:kotlin.Any
BLOCK_BODY
TYPE_OP type=<root>.J<kotlin.String> origin=CAST typeOperand=<root>.J<kotlin.String>
GET_VAR 'a: kotlin.Any declared in <root>.test4' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=<root>.J<kotlin.String> origin=CAST typeOperand=<root>.J<kotlin.String>
GET_VAR 'a: kotlin.Any declared in <root>.test4' type=kotlin.Any origin=null
CALL 'public open fun bar <X> (j: <root>.J<X of <root>.H.bar?>?): kotlin.Unit declared in <root>.H' type=kotlin.Unit origin=null
<X>: kotlin.String?
j: TYPE_OP type=<root>.J<kotlin.String> origin=IMPLICIT_CAST typeOperand=<root>.J<kotlin.String>
@@ -43,8 +44,9 @@ FILE fqName:<root> fileName:/samConversionToGeneric.kt
FUN name:test5 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:kotlin.Any
BLOCK_BODY
TYPE_OP type=kotlin.Function1<kotlin.String, kotlin.String> origin=CAST typeOperand=kotlin.Function1<kotlin.String, kotlin.String>
GET_VAR 'a: kotlin.Any declared in <root>.test5' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=kotlin.Function1<kotlin.String, kotlin.String> origin=CAST typeOperand=kotlin.Function1<kotlin.String, kotlin.String>
GET_VAR 'a: kotlin.Any declared in <root>.test5' type=kotlin.Any origin=null
CALL 'public open fun bar <X> (j: <root>.J<X of <root>.H.bar?>?): kotlin.Unit declared in <root>.H' type=kotlin.Unit origin=null
<X>: kotlin.String?
j: TYPE_OP type=<root>.J<X of <root>.H.bar?>? origin=SAM_CONVERSION typeOperand=<root>.J<X of <root>.H.bar?>?
@@ -62,8 +64,9 @@ FILE fqName:<root> fileName:/samConversionToGeneric.kt
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
VALUE_PARAMETER name:a index:0 type:kotlin.Any
BLOCK_BODY
TYPE_OP type=kotlin.Function1<T of <root>.test7, T of <root>.test7> origin=CAST typeOperand=kotlin.Function1<T of <root>.test7, T of <root>.test7>
GET_VAR 'a: kotlin.Any declared in <root>.test7' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=kotlin.Function1<T of <root>.test7, T of <root>.test7> origin=CAST typeOperand=kotlin.Function1<T of <root>.test7, T of <root>.test7>
GET_VAR 'a: kotlin.Any declared in <root>.test7' type=kotlin.Any origin=null
CALL 'public open fun bar <X> (j: <root>.J<X of <root>.H.bar?>?): kotlin.Unit declared in <root>.H' type=kotlin.Unit origin=null
<X>: T of <root>.test7?
j: TYPE_OP type=<root>.J<X of <root>.H.bar?>? origin=SAM_CONVERSION typeOperand=<root>.J<X of <root>.H.bar?>?
@@ -66,9 +66,10 @@ FILE fqName:<root> fileName:/samConversionsWithSmartCasts.kt
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=java.lang.Runnable
GET_VAR 'a: kotlin.Any declared in <root>.test5x' type=kotlin.Any origin=null
then: BLOCK type=kotlin.Unit origin=null
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=CAST typeOperand=kotlin.Function0<kotlin.Unit>
TYPE_OP type=java.lang.Runnable origin=IMPLICIT_CAST typeOperand=java.lang.Runnable
GET_VAR 'a: kotlin.Any declared in <root>.test5x' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=CAST typeOperand=kotlin.Function0<kotlin.Unit>
TYPE_OP type=java.lang.Runnable origin=IMPLICIT_CAST typeOperand=java.lang.Runnable
GET_VAR 'a: kotlin.Any declared in <root>.test5x' type=kotlin.Any origin=null
CALL 'public open fun run1 (r: java.lang.Runnable?): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.J' type=<root>.J origin=null
r: TYPE_OP type=java.lang.Runnable origin=IMPLICIT_CAST typeOperand=java.lang.Runnable
@@ -76,8 +77,9 @@ FILE fqName:<root> fileName:/samConversionsWithSmartCasts.kt
FUN name:test6 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:kotlin.Any
BLOCK_BODY
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=CAST typeOperand=kotlin.Function0<kotlin.Unit>
GET_VAR 'a: kotlin.Any declared in <root>.test6' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=CAST typeOperand=kotlin.Function0<kotlin.Unit>
GET_VAR 'a: kotlin.Any declared in <root>.test6' type=kotlin.Any origin=null
CALL 'public open fun run1 (r: java.lang.Runnable?): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.J' type=<root>.J origin=null
r: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable?
@@ -86,8 +88,9 @@ FILE fqName:<root> fileName:/samConversionsWithSmartCasts.kt
FUN name:test7 visibility:public modality:FINAL <> (a:kotlin.Function1<kotlin.Int, kotlin.Int>) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:kotlin.Function1<kotlin.Int, kotlin.Int>
BLOCK_BODY
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=CAST typeOperand=kotlin.Function0<kotlin.Unit>
GET_VAR 'a: kotlin.Function1<kotlin.Int, kotlin.Int> declared in <root>.test7' type=kotlin.Function1<kotlin.Int, kotlin.Int> origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=CAST typeOperand=kotlin.Function0<kotlin.Unit>
GET_VAR 'a: kotlin.Function1<kotlin.Int, kotlin.Int> declared in <root>.test7' type=kotlin.Function1<kotlin.Int, kotlin.Int> origin=null
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): /J.run1>#' type=kotlin.Unit
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=IMPLICIT_CAST typeOperand=kotlin.Function0<kotlin.Unit>
GET_VAR 'a: kotlin.Function1<kotlin.Int, kotlin.Int> declared in <root>.test7' type=kotlin.Function1<kotlin.Int, kotlin.Int> origin=null
@@ -95,8 +95,9 @@ FILE fqName:<root> fileName:/suspendConversionOnArbitraryExpression.kt
FUN name:testSmartCastWithSuspendConversion visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:kotlin.Any
BLOCK_BODY
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=CAST typeOperand=kotlin.Function0<kotlin.Unit>
GET_VAR 'a: kotlin.Any declared in <root>.testSmartCastWithSuspendConversion' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=CAST typeOperand=kotlin.Function0<kotlin.Unit>
GET_VAR 'a: kotlin.Any declared in <root>.testSmartCastWithSuspendConversion' type=kotlin.Any origin=null
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): /useSuspend>#' type=kotlin.Unit
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=IMPLICIT_CAST typeOperand=kotlin.Function0<kotlin.Unit>
GET_VAR 'a: kotlin.Any declared in <root>.testSmartCastWithSuspendConversion' type=kotlin.Any origin=null
@@ -105,16 +106,18 @@ FILE fqName:<root> fileName:/suspendConversionOnArbitraryExpression.kt
BLOCK_BODY
VAR name:b type:kotlin.Any [var]
GET_VAR 'a: kotlin.Any declared in <root>.testSmartCastOnVarWithSuspendConversion' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=CAST typeOperand=kotlin.Function0<kotlin.Unit>
GET_VAR 'var b: kotlin.Any [var] declared in <root>.testSmartCastOnVarWithSuspendConversion' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=CAST typeOperand=kotlin.Function0<kotlin.Unit>
GET_VAR 'var b: kotlin.Any [var] declared in <root>.testSmartCastOnVarWithSuspendConversion' type=kotlin.Any origin=null
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): /useSuspend>#' type=kotlin.Unit
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=IMPLICIT_CAST typeOperand=kotlin.Function0<kotlin.Unit>
GET_VAR 'var b: kotlin.Any [var] declared in <root>.testSmartCastOnVarWithSuspendConversion' type=kotlin.Any origin=null
FUN name:testSmartCastVsSuspendConversion visibility:public modality:FINAL <> (a:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:kotlin.Function0<kotlin.Unit>
BLOCK_BODY
TYPE_OP type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=CAST typeOperand=kotlin.coroutines.SuspendFunction0<kotlin.Unit>
GET_VAR 'a: kotlin.Function0<kotlin.Unit> declared in <root>.testSmartCastVsSuspendConversion' type=kotlin.Function0<kotlin.Unit> origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=CAST typeOperand=kotlin.coroutines.SuspendFunction0<kotlin.Unit>
GET_VAR 'a: kotlin.Function0<kotlin.Unit> declared in <root>.testSmartCastVsSuspendConversion' type=kotlin.Function0<kotlin.Unit> origin=null
CALL 'public final fun useSuspend (sfn: kotlin.coroutines.SuspendFunction0<kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
sfn: TYPE_OP type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=IMPLICIT_CAST typeOperand=kotlin.coroutines.SuspendFunction0<kotlin.Unit>
GET_VAR 'a: kotlin.Function0<kotlin.Unit> declared in <root>.testSmartCastVsSuspendConversion' type=kotlin.Function0<kotlin.Unit> origin=null
@@ -123,8 +126,9 @@ FILE fqName:<root> fileName:/suspendConversionOnArbitraryExpression.kt
BLOCK_BODY
VAR name:b type:kotlin.Function0<kotlin.Unit> [var]
GET_VAR 'a: kotlin.Function0<kotlin.Unit> declared in <root>.testSmartCastOnVarVsSuspendConversion' type=kotlin.Function0<kotlin.Unit> origin=null
TYPE_OP type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=CAST typeOperand=kotlin.coroutines.SuspendFunction0<kotlin.Unit>
GET_VAR 'var b: kotlin.Function0<kotlin.Unit> [var] declared in <root>.testSmartCastOnVarVsSuspendConversion' type=kotlin.Function0<kotlin.Unit> origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=kotlin.coroutines.SuspendFunction0<kotlin.Unit> origin=CAST typeOperand=kotlin.coroutines.SuspendFunction0<kotlin.Unit>
GET_VAR 'var b: kotlin.Function0<kotlin.Unit> [var] declared in <root>.testSmartCastOnVarVsSuspendConversion' type=kotlin.Function0<kotlin.Unit> origin=null
CALL 'public final fun useSuspend (sfn: kotlin.coroutines.SuspendFunction0<kotlin.Unit>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
sfn: GET_VAR 'var b: kotlin.Function0<kotlin.Unit> [var] declared in <root>.testSmartCastOnVarVsSuspendConversion' type=kotlin.Function0<kotlin.Unit> origin=null
FUN name:testIntersectionVsSuspendConversion visibility:public modality:FINAL <T> (x:T of <root>.testIntersectionVsSuspendConversion) returnType:kotlin.Unit
@@ -3,21 +3,22 @@ FILE fqName:<root> fileName:/whenUnusedExpression.kt
VALUE_PARAMETER name:b index:0 type:kotlin.Boolean
VALUE_PARAMETER name:i index:1 type:kotlin.Int
BLOCK_BODY
WHEN type=kotlin.Int? origin=IF
BRANCH
if: GET_VAR 'b: kotlin.Boolean declared in <root>.test' type=kotlin.Boolean origin=null
then: BLOCK type=kotlin.Int? origin=WHEN
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val]
GET_VAR 'i: kotlin.Int declared in <root>.test' type=kotlin.Int origin=null
WHEN type=kotlin.Int? origin=WHEN
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_0: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=0
then: CONST Int type=kotlin.Int value=1
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Null type=kotlin.Nothing? value=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
WHEN type=kotlin.Int? origin=IF
BRANCH
if: GET_VAR 'b: kotlin.Boolean declared in <root>.test' type=kotlin.Boolean origin=null
then: BLOCK type=kotlin.Int? origin=WHEN
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val]
GET_VAR 'i: kotlin.Int declared in <root>.test' type=kotlin.Int origin=null
WHEN type=kotlin.Int? origin=WHEN
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_0: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=0
then: CONST Int type=kotlin.Int value=1
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Null type=kotlin.Nothing? value=null
+2 -1
View File
@@ -10,5 +10,6 @@ FILE fqName:<root> fileName:/localFunction.kt
SET_VAR 'var x: kotlin.Int [var] declared in <root>.outer' type=kotlin.Unit origin=EQ
CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.outer.local' type=kotlin.Int origin=null
GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.outer.local' type=kotlin.Int origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.outer.local' type=kotlin.Int origin=null
CALL 'local final fun local (): kotlin.Unit declared in <root>.outer' type=kotlin.Unit origin=null
@@ -85,35 +85,36 @@ FILE fqName:<root> fileName:/multipleImplicitReceivers.kt
VALUE_PARAMETER name:fooImpl index:0 type:<root>.IFoo
VALUE_PARAMETER name:invokeImpl index:1 type:<root>.IInvoke
BLOCK_BODY
CALL 'public final fun with <T, R> (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.with, R of kotlin.with>): R of kotlin.with [inline] declared in kotlin' type=kotlin.Int origin=null
<T>: <root>.A
<R>: kotlin.Int
receiver: GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.A
block: FUN_EXPR type=kotlin.Function1<<root>.A, kotlin.Int> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.A) returnType:kotlin.Int
$receiver: VALUE_PARAMETER name:<this> type:<root>.A
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Int declared in <root>.test'
CALL 'public final fun with <T, R> (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.with, R of kotlin.with>): R of kotlin.with [inline] declared in kotlin' type=kotlin.Int origin=null
<T>: <root>.IFoo
<R>: kotlin.Int
receiver: GET_VAR 'fooImpl: <root>.IFoo declared in <root>.test' type=<root>.IFoo origin=null
block: FUN_EXPR type=kotlin.Function1<<root>.IFoo, kotlin.Int> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.IFoo) returnType:kotlin.Int
$receiver: VALUE_PARAMETER name:<this> type:<root>.IFoo
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Int declared in <root>.test.<anonymous>'
CALL 'public final fun with <T, R> (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.with, R of kotlin.with>): R of kotlin.with [inline] declared in kotlin' type=kotlin.Int origin=null
<T>: <root>.IInvoke
<R>: kotlin.Int
receiver: GET_VAR 'invokeImpl: <root>.IInvoke declared in <root>.test' type=<root>.IInvoke origin=null
block: FUN_EXPR type=kotlin.Function1<<root>.IInvoke, kotlin.Int> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.IInvoke) returnType:kotlin.Int
$receiver: VALUE_PARAMETER name:<this> type:<root>.IInvoke
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Int declared in <root>.test.<anonymous>.<anonymous>'
CALL 'public open fun invoke (): kotlin.Int [operator] declared in <root>.IInvoke' type=kotlin.Int origin=null
$this: GET_VAR '<this>: <root>.IInvoke declared in <root>.test.<anonymous>.<anonymous>.<anonymous>' type=<root>.IInvoke origin=null
$receiver: CALL 'public open fun <get-foo> (): <root>.B declared in <root>.IFoo' type=<root>.B origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.IFoo declared in <root>.test.<anonymous>.<anonymous>' type=<root>.IFoo origin=null
$receiver: GET_VAR '<this>: <root>.A declared in <root>.test.<anonymous>' type=<root>.A origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun with <T, R> (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.with, R of kotlin.with>): R of kotlin.with [inline] declared in kotlin' type=kotlin.Int origin=null
<T>: <root>.A
<R>: kotlin.Int
receiver: GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.A
block: FUN_EXPR type=kotlin.Function1<<root>.A, kotlin.Int> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.A) returnType:kotlin.Int
$receiver: VALUE_PARAMETER name:<this> type:<root>.A
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Int declared in <root>.test'
CALL 'public final fun with <T, R> (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.with, R of kotlin.with>): R of kotlin.with [inline] declared in kotlin' type=kotlin.Int origin=null
<T>: <root>.IFoo
<R>: kotlin.Int
receiver: GET_VAR 'fooImpl: <root>.IFoo declared in <root>.test' type=<root>.IFoo origin=null
block: FUN_EXPR type=kotlin.Function1<<root>.IFoo, kotlin.Int> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.IFoo) returnType:kotlin.Int
$receiver: VALUE_PARAMETER name:<this> type:<root>.IFoo
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Int declared in <root>.test.<anonymous>'
CALL 'public final fun with <T, R> (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.with, R of kotlin.with>): R of kotlin.with [inline] declared in kotlin' type=kotlin.Int origin=null
<T>: <root>.IInvoke
<R>: kotlin.Int
receiver: GET_VAR 'invokeImpl: <root>.IInvoke declared in <root>.test' type=<root>.IInvoke origin=null
block: FUN_EXPR type=kotlin.Function1<<root>.IInvoke, kotlin.Int> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.IInvoke) returnType:kotlin.Int
$receiver: VALUE_PARAMETER name:<this> type:<root>.IInvoke
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Int declared in <root>.test.<anonymous>.<anonymous>'
CALL 'public open fun invoke (): kotlin.Int [operator] declared in <root>.IInvoke' type=kotlin.Int origin=null
$this: GET_VAR '<this>: <root>.IInvoke declared in <root>.test.<anonymous>.<anonymous>.<anonymous>' type=<root>.IInvoke origin=null
$receiver: CALL 'public open fun <get-foo> (): <root>.B declared in <root>.IFoo' type=<root>.B origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.IFoo declared in <root>.test.<anonymous>.<anonymous>' type=<root>.IFoo origin=null
$receiver: GET_VAR '<this>: <root>.A declared in <root>.test.<anonymous>' type=<root>.A origin=null
+16 -12
View File
@@ -5,18 +5,22 @@ FILE fqName:<root> fileName:/asOnPlatformType.kt
CALL 'public open fun nullString (): kotlin.String? declared in <root>.JavaClass' type=kotlin.String? origin=null
VAR name:nonnullStr type:kotlin.String? [val]
CALL 'public open fun nonnullString (): kotlin.String? declared in <root>.JavaClass' type=kotlin.String? origin=null
CALL 'public final fun foo <T> (): T of <root>.foo [inline] declared in <root>' type=kotlin.String? origin=null
<T>: kotlin.String?
$receiver: GET_VAR 'val nullStr: kotlin.String? [val] declared in <root>.test' type=kotlin.String? origin=null
CALL 'public final fun foo <T> (): T of <root>.foo [inline] declared in <root>' type=kotlin.String? origin=null
<T>: kotlin.String?
$receiver: GET_VAR 'val nonnullStr: kotlin.String? [val] declared in <root>.test' type=kotlin.String? origin=null
CALL 'public final fun fooN <T> (): T of <root>.fooN? [inline] declared in <root>' type=kotlin.String? origin=null
<T>: kotlin.String?
$receiver: GET_VAR 'val nullStr: kotlin.String? [val] declared in <root>.test' type=kotlin.String? origin=null
CALL 'public final fun fooN <T> (): T of <root>.fooN? [inline] declared in <root>' type=kotlin.String? origin=null
<T>: kotlin.String?
$receiver: GET_VAR 'val nonnullStr: kotlin.String? [val] declared in <root>.test' type=kotlin.String? origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun foo <T> (): T of <root>.foo [inline] declared in <root>' type=kotlin.String? origin=null
<T>: kotlin.String?
$receiver: GET_VAR 'val nullStr: kotlin.String? [val] declared in <root>.test' type=kotlin.String? origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun foo <T> (): T of <root>.foo [inline] declared in <root>' type=kotlin.String? origin=null
<T>: kotlin.String?
$receiver: GET_VAR 'val nonnullStr: kotlin.String? [val] declared in <root>.test' type=kotlin.String? origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun fooN <T> (): T of <root>.fooN? [inline] declared in <root>' type=kotlin.String? origin=null
<T>: kotlin.String?
$receiver: GET_VAR 'val nullStr: kotlin.String? [val] declared in <root>.test' type=kotlin.String? origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun fooN <T> (): T of <root>.fooN? [inline] declared in <root>' type=kotlin.String? origin=null
<T>: kotlin.String?
$receiver: GET_VAR 'val nonnullStr: kotlin.String? [val] declared in <root>.test' type=kotlin.String? origin=null
FUN name:foo visibility:public modality:FINAL <T> ($receiver:T of <root>.foo) returnType:T of <root>.foo [inline]
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
$receiver: VALUE_PARAMETER name:<this> type:T of <root>.foo
@@ -71,8 +71,9 @@ FILE fqName:<root> fileName:/genericPropertyReferenceType.kt
FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:kotlin.Any
BLOCK_BODY
TYPE_OP type=<root>.C<kotlin.String> origin=CAST typeOperand=<root>.C<kotlin.String>
GET_VAR 'a: kotlin.Any declared in <root>.test2' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=<root>.C<kotlin.String> origin=CAST typeOperand=<root>.C<kotlin.String>
GET_VAR 'a: kotlin.Any declared in <root>.test2' type=kotlin.Any origin=null
CALL 'public final fun use (p: kotlin.reflect.KMutableProperty<kotlin.String>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
p: PROPERTY_REFERENCE 'public final y: T of <root>.<get-y> [var]' field=null getter='public final fun <get-y> <T> (): T of <root>.<get-y> declared in <root>' setter='public final fun <set-y> <T> (v: T of <root>.<get-y>): kotlin.Unit declared in <root>' type=kotlin.reflect.KMutableProperty0<kotlin.String> origin=null
<1>: kotlin.String
@@ -1,45 +0,0 @@
FILE fqName:<root> fileName:/inStarProjectionInReceiverType.kt
CLASS INTERFACE name:Foo modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Foo<T of <root>.Foo>
TYPE_PARAMETER name:T index:0 variance:in superTypes:[kotlin.Any?]
PROPERTY name:x visibility:public modality:ABSTRACT [val]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:ABSTRACT <> ($this:<root>.Foo<T of <root>.Foo>) returnType:kotlin.Int
correspondingProperty: PROPERTY name:x visibility:public modality:ABSTRACT [val]
$this: VALUE_PARAMETER name:<this> type:<root>.Foo<T of <root>.Foo>
FUN name:foo visibility:public modality:ABSTRACT <> ($this:<root>.Foo<T of <root>.Foo>, x:T of <root>.Foo) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.Foo<T of <root>.Foo>
VALUE_PARAMETER name:x index:0 type:T of <root>.Foo
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
FUN name:testReceiver visibility:public modality:FINAL <> ($receiver:<root>.Foo<*>) returnType:kotlin.Int
$receiver: VALUE_PARAMETER name:<this> type:<root>.Foo<*>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testReceiver (): kotlin.Int declared in <root>'
CALL 'public abstract fun <get-x> (): kotlin.Int declared in <root>.Foo' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Foo<*> declared in <root>.testReceiver' type=<root>.Foo<*> origin=null
FUN name:testSmartCastOnExtensionReceiver visibility:public modality:FINAL <> ($receiver:<root>.Foo<*>) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:<this> type:<root>.Foo<*>
BLOCK_BODY
TYPE_OP type=<root>.Foo<kotlin.String> origin=CAST typeOperand=<root>.Foo<kotlin.String>
GET_VAR '<this>: <root>.Foo<*> declared in <root>.testSmartCastOnExtensionReceiver' type=<root>.Foo<*> origin=null
CALL 'public abstract fun foo (x: T of <root>.Foo): kotlin.Unit declared in <root>.Foo' type=kotlin.Unit origin=null
$this: TYPE_OP type=<root>.Foo<kotlin.String> origin=IMPLICIT_CAST typeOperand=<root>.Foo<kotlin.String>
GET_VAR '<this>: <root>.Foo<*> declared in <root>.testSmartCastOnExtensionReceiver' type=<root>.Foo<*> origin=null
x: CONST String type=kotlin.String value="string"
FUN name:testValueParameter visibility:public modality:FINAL <> (vp:<root>.Foo<*>) returnType:kotlin.Int
VALUE_PARAMETER name:vp index:0 type:<root>.Foo<*>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testValueParameter (vp: <root>.Foo<*>): kotlin.Int declared in <root>'
CALL 'public abstract fun <get-x> (): kotlin.Int declared in <root>.Foo' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'vp: <root>.Foo<*> declared in <root>.testValueParameter' type=<root>.Foo<*> origin=null
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !LANGUAGE: +NewInference
interface Foo<in T> {
@@ -63,7 +63,8 @@ FILE fqName:<root> fileName:/intersectionType1_NI.kt
elements: VARARG type=kotlin.Array<out <root>.In<kotlin.String>> varargElementType=<root>.In<kotlin.String>
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.In' type=<root>.In<kotlin.String> origin=null
<class: I>: kotlin.String
CALL 'public final fun foo <T> (a: kotlin.Array<<root>.In<T of <root>.foo>>, b: kotlin.Array<<root>.In<kotlin.String>>): kotlin.Boolean declared in <root>' type=kotlin.Boolean origin=null
<T>: kotlin.Int
a: GET_VAR 'val a1: kotlin.Array<<root>.In<kotlin.Int>> [val] declared in <root>.test' type=kotlin.Array<<root>.In<kotlin.Int>> origin=null
b: GET_VAR 'val a2: kotlin.Array<<root>.In<kotlin.String>> [val] declared in <root>.test' type=kotlin.Array<<root>.In<kotlin.String>> origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun foo <T> (a: kotlin.Array<<root>.In<T of <root>.foo>>, b: kotlin.Array<<root>.In<kotlin.String>>): kotlin.Boolean declared in <root>' type=kotlin.Boolean origin=null
<T>: kotlin.Int
a: GET_VAR 'val a1: kotlin.Array<<root>.In<kotlin.Int>> [val] declared in <root>.test' type=kotlin.Array<<root>.In<kotlin.Int>> origin=null
b: GET_VAR 'val a2: kotlin.Array<<root>.In<kotlin.String>> [val] declared in <root>.test' type=kotlin.Array<<root>.In<kotlin.String>> origin=null
@@ -63,7 +63,8 @@ FILE fqName:<root> fileName:/intersectionType1_OI.kt
elements: VARARG type=kotlin.Array<out <root>.In<kotlin.String>> varargElementType=<root>.In<kotlin.String>
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.In' type=<root>.In<kotlin.String> origin=null
<class: I>: kotlin.String
CALL 'public final fun foo <T> (a: kotlin.Array<<root>.In<T of <root>.foo>>, b: kotlin.Array<<root>.In<kotlin.String>>): kotlin.Boolean declared in <root>' type=kotlin.Boolean origin=null
<T>: kotlin.Int
a: GET_VAR 'val a1: kotlin.Array<<root>.In<kotlin.Int>> [val] declared in <root>.test' type=kotlin.Array<<root>.In<kotlin.Int>> origin=null
b: GET_VAR 'val a2: kotlin.Array<<root>.In<kotlin.String>> [val] declared in <root>.test' type=kotlin.Array<<root>.In<kotlin.String>> origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun foo <T> (a: kotlin.Array<<root>.In<T of <root>.foo>>, b: kotlin.Array<<root>.In<kotlin.String>>): kotlin.Boolean declared in <root>' type=kotlin.Boolean origin=null
<T>: kotlin.Int
a: GET_VAR 'val a1: kotlin.Array<<root>.In<kotlin.Int>> [val] declared in <root>.test' type=kotlin.Array<<root>.In<kotlin.Int>> origin=null
b: GET_VAR 'val a2: kotlin.Array<<root>.In<kotlin.String>> [val] declared in <root>.test' type=kotlin.Array<<root>.In<kotlin.String>> origin=null
@@ -26,8 +26,9 @@ FILE fqName:<root> fileName:/intersectionType3_NI.kt
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
$receiver: VALUE_PARAMETER name:<this> type:<root>.In<T of <root>.asT>
BLOCK_BODY
TYPE_OP type=T of <root>.asT origin=CAST typeOperand=T of <root>.asT
GET_VAR '<this>: <root>.In<T of <root>.asT> declared in <root>.asT' type=<root>.In<T of <root>.asT> origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=T of <root>.asT origin=CAST typeOperand=T of <root>.asT
GET_VAR '<this>: <root>.In<T of <root>.asT> declared in <root>.asT' type=<root>.In<T of <root>.asT> origin=null
FUN name:sel visibility:public modality:FINAL <S> (x:S of <root>.sel, y:S of <root>.sel) returnType:S of <root>.sel
TYPE_PARAMETER name:S index:0 variance: superTypes:[kotlin.Any?]
VALUE_PARAMETER name:x index:0 type:S of <root>.sel
@@ -26,8 +26,9 @@ FILE fqName:<root> fileName:/intersectionType3_OI.kt
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
$receiver: VALUE_PARAMETER name:<this> type:<root>.In<T of <root>.asT>
BLOCK_BODY
TYPE_OP type=T of <root>.asT origin=CAST typeOperand=T of <root>.asT
GET_VAR '<this>: <root>.In<T of <root>.asT> declared in <root>.asT' type=<root>.In<T of <root>.asT> origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=T of <root>.asT origin=CAST typeOperand=T of <root>.asT
GET_VAR '<this>: <root>.In<T of <root>.asT> declared in <root>.asT' type=<root>.In<T of <root>.asT> origin=null
FUN name:sel visibility:public modality:FINAL <S> (x:S of <root>.sel, y:S of <root>.sel) returnType:S of <root>.sel
TYPE_PARAMETER name:S index:0 variance: superTypes:[kotlin.Any?]
VALUE_PARAMETER name:x index:0 type:S of <root>.sel
@@ -69,9 +69,11 @@ FILE fqName:<root> fileName:/implicitNotNullOnPlatformType.kt
FUN name:testContains visibility:public modality:FINAL <> (m:<root>.MySet) returnType:kotlin.Unit
VALUE_PARAMETER name:m index:0 type:<root>.MySet
BLOCK_BODY
CALL 'public final fun contains (element: kotlin.String): kotlin.Boolean declared in <root>.MySet' type=kotlin.Boolean origin=null
$this: GET_VAR 'm: <root>.MySet declared in <root>.testContains' type=<root>.MySet origin=null
element: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:STRING type:kotlin.String? visibility:public [static]' type=kotlin.String? origin=GET_PROPERTY
CALL 'public final fun contains (element: kotlin.String): kotlin.Boolean declared in <root>.MySet' type=kotlin.Boolean origin=null
$this: GET_VAR 'm: <root>.MySet declared in <root>.testContains' type=<root>.MySet origin=null
element: CONST String type=kotlin.String value="abc"
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun contains (element: kotlin.String): kotlin.Boolean declared in <root>.MySet' type=kotlin.Boolean origin=null
$this: GET_VAR 'm: <root>.MySet declared in <root>.testContains' type=<root>.MySet origin=null
element: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:STRING type:kotlin.String? visibility:public [static]' type=kotlin.String? origin=GET_PROPERTY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun contains (element: kotlin.String): kotlin.Boolean declared in <root>.MySet' type=kotlin.Boolean origin=null
$this: GET_VAR 'm: <root>.MySet declared in <root>.testContains' type=<root>.MySet origin=null
element: CONST String type=kotlin.String value="abc"
@@ -182,14 +182,17 @@ FILE fqName:<root> fileName:/smartCastOnFakeOverrideReceiver.kt
$this: VALUE_PARAMETER name:<this> type:<root>.GB<T of <root>.GB, S of <root>.GB>
VALUE_PARAMETER name:a index:0 type:kotlin.Any
BLOCK_BODY
TYPE_OP type=<root>.GB<kotlin.Int, kotlin.String> origin=CAST typeOperand=<root>.GB<kotlin.Int, kotlin.String>
GET_VAR 'a: kotlin.Any declared in <root>.GB.testGB1' type=kotlin.Any origin=null
CALL 'public final fun f (): kotlin.Int declared in <root>.GA' type=kotlin.Int origin=null
$this: TYPE_OP type=<root>.GB<kotlin.Int, kotlin.String> origin=IMPLICIT_CAST typeOperand=<root>.GB<kotlin.Int, kotlin.String>
GET_VAR 'a: kotlin.Any declared in <root>.GB.testGB1' type=kotlin.Any origin=null
CALL 'public final fun <get-aVal> (): kotlin.Int declared in <root>.GA' type=kotlin.Int origin=GET_PROPERTY
$this: TYPE_OP type=<root>.GB<kotlin.Int, kotlin.String> origin=IMPLICIT_CAST typeOperand=<root>.GB<kotlin.Int, kotlin.String>
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=<root>.GB<kotlin.Int, kotlin.String> origin=CAST typeOperand=<root>.GB<kotlin.Int, kotlin.String>
GET_VAR 'a: kotlin.Any declared in <root>.GB.testGB1' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun f (): kotlin.Int declared in <root>.GA' type=kotlin.Int origin=null
$this: TYPE_OP type=<root>.GB<kotlin.Int, kotlin.String> origin=IMPLICIT_CAST typeOperand=<root>.GB<kotlin.Int, kotlin.String>
GET_VAR 'a: kotlin.Any declared in <root>.GB.testGB1' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-aVal> (): kotlin.Int declared in <root>.GA' type=kotlin.Int origin=GET_PROPERTY
$this: TYPE_OP type=<root>.GB<kotlin.Int, kotlin.String> origin=IMPLICIT_CAST typeOperand=<root>.GB<kotlin.Int, kotlin.String>
GET_VAR 'a: kotlin.Any declared in <root>.GB.testGB1' type=kotlin.Any origin=null
FUN FAKE_OVERRIDE name:f visibility:public modality:FINAL <> ($this:<root>.GA<T of <root>.GA>) returnType:kotlin.Int [fake_override]
overridden:
public final fun f (): kotlin.Int declared in <root>.GA
@@ -3,10 +3,12 @@ FILE fqName:<root> fileName:/smartCastOnFieldReceiverOfGenericType.kt
VALUE_PARAMETER name:a index:0 type:kotlin.Any
VALUE_PARAMETER name:b index:1 type:kotlin.Any
BLOCK_BODY
TYPE_OP type=<root>.JCell<kotlin.String> origin=CAST typeOperand=<root>.JCell<kotlin.String>
GET_VAR 'a: kotlin.Any declared in <root>.testSetField' type=kotlin.Any origin=null
TYPE_OP type=kotlin.String origin=CAST typeOperand=kotlin.String
GET_VAR 'b: kotlin.Any declared in <root>.testSetField' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=<root>.JCell<kotlin.String> origin=CAST typeOperand=<root>.JCell<kotlin.String>
GET_VAR 'a: kotlin.Any declared in <root>.testSetField' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=kotlin.String origin=CAST typeOperand=kotlin.String
GET_VAR 'b: kotlin.Any declared in <root>.testSetField' type=kotlin.Any origin=null
SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:value type:kotlin.String? visibility:public' type=kotlin.Unit origin=EQ
receiver: TYPE_OP type=<root>.JCell<kotlin.String> origin=IMPLICIT_CAST typeOperand=<root>.JCell<kotlin.String>
GET_VAR 'a: kotlin.Any declared in <root>.testSetField' type=kotlin.Any origin=null
@@ -15,8 +17,9 @@ FILE fqName:<root> fileName:/smartCastOnFieldReceiverOfGenericType.kt
FUN name:testGetField visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.String
VALUE_PARAMETER name:a index:0 type:kotlin.Any
BLOCK_BODY
TYPE_OP type=<root>.JCell<kotlin.String> origin=CAST typeOperand=<root>.JCell<kotlin.String>
GET_VAR 'a: kotlin.Any declared in <root>.testGetField' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
TYPE_OP type=<root>.JCell<kotlin.String> origin=CAST typeOperand=<root>.JCell<kotlin.String>
GET_VAR 'a: kotlin.Any declared in <root>.testGetField' type=kotlin.Any origin=null
RETURN type=kotlin.Nothing from='public final fun testGetField (a: kotlin.Any): kotlin.String declared in <root>'
GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:value type:kotlin.String? visibility:public' type=kotlin.String? origin=GET_PROPERTY
receiver: TYPE_OP type=<root>.JCell<kotlin.String> origin=IMPLICIT_CAST typeOperand=<root>.JCell<kotlin.String>
@@ -1,145 +0,0 @@
FILE fqName:<root> fileName:/smartCastOnReceiverOfGenericType.kt
FUN name:testFunction visibility:public modality:FINAL <> (a:kotlin.Any, b:kotlin.Any) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:kotlin.Any
VALUE_PARAMETER name:b index:1 type:kotlin.Any
BLOCK_BODY
TYPE_OP type=kotlin.collections.MutableList<kotlin.String> origin=CAST typeOperand=kotlin.collections.MutableList<kotlin.String>
GET_VAR 'a: kotlin.Any declared in <root>.testFunction' type=kotlin.Any origin=null
TYPE_OP type=kotlin.String origin=CAST typeOperand=kotlin.String
GET_VAR 'b: kotlin.Any declared in <root>.testFunction' type=kotlin.Any origin=null
CALL 'public abstract fun add (element: E of kotlin.collections.MutableList): kotlin.Boolean declared in kotlin.collections.MutableList' type=kotlin.Boolean origin=null
$this: TYPE_OP type=kotlin.collections.MutableList<kotlin.String> origin=IMPLICIT_CAST typeOperand=kotlin.collections.MutableList<kotlin.String>
GET_VAR 'a: kotlin.Any declared in <root>.testFunction' type=kotlin.Any origin=null
element: TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR 'b: kotlin.Any declared in <root>.testFunction' type=kotlin.Any origin=null
FUN name:testProperty visibility:public modality:FINAL <> (a:kotlin.Any, b:kotlin.Any) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:kotlin.Any
VALUE_PARAMETER name:b index:1 type:kotlin.Any
BLOCK_BODY
TYPE_OP type=<root>.Cell<kotlin.String> origin=CAST typeOperand=<root>.Cell<kotlin.String>
GET_VAR 'a: kotlin.Any declared in <root>.testProperty' type=kotlin.Any origin=null
TYPE_OP type=kotlin.String origin=CAST typeOperand=kotlin.String
GET_VAR 'b: kotlin.Any declared in <root>.testProperty' type=kotlin.Any origin=null
CALL 'public final fun <set-value> (<set-?>: T of <root>.Cell): kotlin.Unit declared in <root>.Cell' type=kotlin.Unit origin=EQ
$this: TYPE_OP type=<root>.Cell<kotlin.String> origin=IMPLICIT_CAST typeOperand=<root>.Cell<kotlin.String>
GET_VAR 'a: kotlin.Any declared in <root>.testProperty' type=kotlin.Any origin=null
<set-?>: TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR 'b: kotlin.Any declared in <root>.testProperty' type=kotlin.Any origin=null
FUN name:testInnerClass visibility:public modality:FINAL <> (a:kotlin.Any, b:kotlin.Any, c:kotlin.Any) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:kotlin.Any
VALUE_PARAMETER name:b index:1 type:kotlin.Any
VALUE_PARAMETER name:c index:2 type:kotlin.Any
BLOCK_BODY
TYPE_OP type=<root>.Outer.Inner<kotlin.String, kotlin.Int> origin=CAST typeOperand=<root>.Outer.Inner<kotlin.String, kotlin.Int>
GET_VAR 'a: kotlin.Any declared in <root>.testInnerClass' type=kotlin.Any origin=null
TYPE_OP type=kotlin.Int origin=CAST typeOperand=kotlin.Int
GET_VAR 'b: kotlin.Any declared in <root>.testInnerClass' type=kotlin.Any origin=null
TYPE_OP type=kotlin.String origin=CAST typeOperand=kotlin.String
GET_VAR 'c: kotlin.Any declared in <root>.testInnerClass' type=kotlin.Any origin=null
CALL 'public final fun use (x1: T1 of <root>.Outer, x2: T2 of <root>.Outer.Inner): kotlin.Unit declared in <root>.Outer.Inner' type=kotlin.Unit origin=null
$this: TYPE_OP type=<root>.Outer.Inner<kotlin.String, kotlin.Int> origin=IMPLICIT_CAST typeOperand=<root>.Outer.Inner<kotlin.String, kotlin.Int>
GET_VAR 'a: kotlin.Any declared in <root>.testInnerClass' type=kotlin.Any origin=null
x1: TYPE_OP type=kotlin.Int origin=IMPLICIT_CAST typeOperand=kotlin.Int
GET_VAR 'b: kotlin.Any declared in <root>.testInnerClass' type=kotlin.Any origin=null
x2: TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR 'c: kotlin.Any declared in <root>.testInnerClass' type=kotlin.Any origin=null
FUN name:testNonSubstitutedTypeParameter visibility:public modality:FINAL <T> (a:kotlin.Any, b:kotlin.Any) returnType:kotlin.Unit
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
VALUE_PARAMETER name:a index:0 type:kotlin.Any
VALUE_PARAMETER name:b index:1 type:kotlin.Any
BLOCK_BODY
TYPE_OP type=kotlin.collections.MutableList<kotlin.collections.List<T of <root>.testNonSubstitutedTypeParameter>> origin=CAST typeOperand=kotlin.collections.MutableList<kotlin.collections.List<T of <root>.testNonSubstitutedTypeParameter>>
GET_VAR 'a: kotlin.Any declared in <root>.testNonSubstitutedTypeParameter' type=kotlin.Any origin=null
TYPE_OP type=kotlin.collections.List<T of <root>.testNonSubstitutedTypeParameter> origin=CAST typeOperand=kotlin.collections.List<T of <root>.testNonSubstitutedTypeParameter>
GET_VAR 'b: kotlin.Any declared in <root>.testNonSubstitutedTypeParameter' type=kotlin.Any origin=null
CALL 'public abstract fun add (element: E of kotlin.collections.MutableList): kotlin.Boolean declared in kotlin.collections.MutableList' type=kotlin.Boolean origin=null
$this: TYPE_OP type=kotlin.collections.MutableList<kotlin.collections.List<T of <root>.testNonSubstitutedTypeParameter>> origin=IMPLICIT_CAST typeOperand=kotlin.collections.MutableList<kotlin.collections.List<T of <root>.testNonSubstitutedTypeParameter>>
GET_VAR 'a: kotlin.Any declared in <root>.testNonSubstitutedTypeParameter' type=kotlin.Any origin=null
element: TYPE_OP type=kotlin.collections.List<T of <root>.testNonSubstitutedTypeParameter> origin=IMPLICIT_CAST typeOperand=kotlin.collections.List<T of <root>.testNonSubstitutedTypeParameter>
GET_VAR 'b: kotlin.Any declared in <root>.testNonSubstitutedTypeParameter' type=kotlin.Any origin=null
CLASS CLASS name:Cell modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Cell<T of <root>.Cell>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
CONSTRUCTOR visibility:public <> (value:T of <root>.Cell) returnType:<root>.Cell<T of <root>.Cell> [primary]
VALUE_PARAMETER name:value index:0 type:T of <root>.Cell
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Cell modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:value visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:value type:T of <root>.Cell visibility:private
EXPRESSION_BODY
GET_VAR 'value: T of <root>.Cell declared in <root>.Cell.<init>' type=T of <root>.Cell origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-value> visibility:public modality:FINAL <> ($this:<root>.Cell<T of <root>.Cell>) returnType:T of <root>.Cell
correspondingProperty: PROPERTY name:value visibility:public modality:FINAL [var]
$this: VALUE_PARAMETER name:<this> type:<root>.Cell<T of <root>.Cell>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-value> (): T of <root>.Cell declared in <root>.Cell'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of <root>.Cell visibility:private' type=T of <root>.Cell origin=null
receiver: GET_VAR '<this>: <root>.Cell<T of <root>.Cell> declared in <root>.Cell.<get-value>' type=<root>.Cell<T of <root>.Cell> origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-value> visibility:public modality:FINAL <> ($this:<root>.Cell<T of <root>.Cell>, <set-?>:T of <root>.Cell) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:value visibility:public modality:FINAL [var]
$this: VALUE_PARAMETER name:<this> type:<root>.Cell<T of <root>.Cell>
VALUE_PARAMETER name:<set-?> index:0 type:T of <root>.Cell
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of <root>.Cell visibility:private' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.Cell<T of <root>.Cell> declared in <root>.Cell.<set-value>' type=<root>.Cell<T of <root>.Cell> origin=null
value: GET_VAR '<set-?>: T of <root>.Cell declared in <root>.Cell.<set-value>' type=T of <root>.Cell 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
CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Outer<T1 of <root>.Outer>
TYPE_PARAMETER name:T1 index:0 variance: superTypes:[kotlin.Any?]
CONSTRUCTOR visibility:public <> () returnType:<root>.Outer<T1 of <root>.Outer> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any]'
CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Outer.Inner<T2 of <root>.Outer.Inner, T1 of <root>.Outer>
TYPE_PARAMETER name:T2 index:0 variance: superTypes:[kotlin.Any?]
CONSTRUCTOR visibility:public <> ($this:<root>.Outer<T1 of <root>.Outer>) returnType:<root>.Outer.Inner<T2 of <root>.Outer.Inner, T1 of <root>.Outer> [primary]
$outer: VALUE_PARAMETER name:<this> type:<root>.Outer<T1 of <root>.Outer>
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]'
FUN name:use visibility:public modality:FINAL <> ($this:<root>.Outer.Inner<T2 of <root>.Outer.Inner, T1 of <root>.Outer>, x1:T1 of <root>.Outer, x2:T2 of <root>.Outer.Inner) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.Outer.Inner<T2 of <root>.Outer.Inner, T1 of <root>.Outer>
VALUE_PARAMETER name:x1 index:0 type:T1 of <root>.Outer
VALUE_PARAMETER name:x2 index:1 type:T2 of <root>.Outer.Inner
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
$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
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,4 @@
// FIR_IDENTICAL
fun testFunction(a: Any, b: Any) {
a as MutableList<String>
b as String