Files
kotlin-fork/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.txt
T
Dmitry Petrov bf18186045 More precise implicit cast generation
If an expression 'x' has a definitely non-null type 'T1',
and is used in position with an expected type 'T2',
cast 'x' to 'T2!!' (most common non-null type T*: T* <: T2).
2018-02-07 14:30:59 +03:00

31 lines
2.0 KiB
Plaintext
Vendored

FILE fqName:<root> fileName:/Derived.kt
CLASS CLASS name:Derived modality:FINAL visibility:public flags:
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:Derived flags:
CONSTRUCTOR visibility:public <> () returnType:Derived flags:
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Base()'
INSTANCE_INITIALIZER_CALL classDescriptor='Derived'
FUN name:setValue visibility:public modality:FINAL <> ($this:Derived, v:kotlin.Any) returnType:Unit flags:
$this: VALUE_PARAMETER name:<this> type:Derived flags:
VALUE_PARAMETER name:v index:0 type:kotlin.Any flags:
BLOCK_BODY
WHEN type=kotlin.Unit origin=null
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String
GET_VAR 'value-parameter v: Any' type=kotlin.Any origin=null
then: BLOCK type=kotlin.Unit origin=null
SET_FIELD 'value: String!' type=kotlin.Unit origin=EQ
receiver: GET_VAR 'this@Derived: Derived' type=Derived origin=null
value: TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String
GET_VAR 'value-parameter v: Any' type=kotlin.Any origin=null
PROPERTY FAKE_OVERRIDE name:value type:kotlin.String! visibility:public modality:FINAL flags:var
FIELD FAKE_OVERRIDE name:value type:kotlin.String! visibility:public
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:Boolean flags:
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
VALUE_PARAMETER name:other index:0 type:kotlin.Any? flags:
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:Int flags:
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:String flags:
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags: