PSI2IR: Generate IMPLICIT_NOTNULL casts for platform type values

This commit is contained in:
Dmitry Petrov
2019-11-22 14:15:08 +03:00
parent dabf6376db
commit 20fb519f1a
25 changed files with 264 additions and 49 deletions
@@ -0,0 +1,23 @@
FILE fqName:<root> fileName:/implicitNotNullInDestructuringAssignment.kt
FUN name:component1 visibility:public modality:FINAL <> ($receiver:<root>.J?) returnType:kotlin.Int
$receiver: VALUE_PARAMETER name:<this> type:<root>.J?
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Int declared in <root>'
CONST Int type=kotlin.Int value=1
FUN name:component2 visibility:private modality:FINAL <> ($receiver:<root>.J) returnType:kotlin.Int
$receiver: VALUE_PARAMETER name:<this> type:<root>.J
BLOCK_BODY
RETURN type=kotlin.Nothing from='private final fun component2 (): kotlin.Int declared in <root>'
CONST Int type=kotlin.Int value=2
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
COMPOSITE type=kotlin.Unit origin=DESTRUCTURING_DECLARATION
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.J? [val]
CALL 'public open fun j (): <root>.J? declared in <root>.J' type=<root>.J? origin=null
VAR name:a type:kotlin.Int [val]
CALL 'public final fun component1 (): kotlin.Int declared in <root>' type=kotlin.Int origin=COMPONENT_N(index=1)
$receiver: GET_VAR 'val tmp_0: <root>.J? [val] declared in <root>.test' type=<root>.J? origin=null
VAR name:b type:kotlin.Int [val]
CALL 'private final fun component2 (): kotlin.Int declared in <root>' type=kotlin.Int origin=COMPONENT_N(index=2)
$receiver: TYPE_OP type=<root>.J origin=IMPLICIT_NOTNULL typeOperand=<root>.J
GET_VAR 'val tmp_0: <root>.J? [val] declared in <root>.test' type=<root>.J? origin=null