Add type operand symbol for type operator expression

This commit is contained in:
Dmitry Petrov
2018-02-22 12:39:04 +03:00
parent e89047d2cc
commit b206bf199f
65 changed files with 442 additions and 61 deletions
@@ -7,6 +7,7 @@ FILE fqName:<root> fileName:/coercionToUnit.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='<anonymous>(): Unit'
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags:
CONST Int type=kotlin.Int value=42
FUNCTION_REFERENCE '<anonymous>(): Unit' type=() -> kotlin.Unit origin=LAMBDA
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:Function0<Unit> flags:
@@ -17,12 +18,14 @@ FILE fqName:<root> fileName:/coercionToUnit.kt
VALUE_PARAMETER name:mc index:0 type:kotlin.collections.MutableCollection<kotlin.String> flags:
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags:
CALL 'add(String): Boolean' type=kotlin.Boolean origin=null
$this: GET_VAR 'value-parameter mc: MutableCollection<String>' type=kotlin.collections.MutableCollection<kotlin.String> origin=null
element: CONST String type=kotlin.String value=
FUN name:test3 visibility:public modality:FINAL <> () returnType:Unit flags:
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags:
BLOCK type=kotlin.Unit? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp0_safe_receiver type:java.io.PrintStream! flags:val
GET_FIELD 'out: PrintStream!' type=java.io.PrintStream! origin=GET_PROPERTY
@@ -36,9 +39,11 @@ FILE fqName:<root> fileName:/coercionToUnit.kt
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'println(String!): Unit' type=kotlin.Unit origin=null
$this: TYPE_OP type=java.io.PrintStream origin=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:PrintStream modality:OPEN visibility:public flags:
GET_VAR 'tmp0_safe_receiver: PrintStream!' type=java.io.PrintStream! origin=null
x: CONST String type=kotlin.String value=Hello,
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags:
BLOCK type=kotlin.Unit? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp1_safe_receiver type:java.io.PrintStream! flags:val
GET_FIELD 'out: PrintStream!' type=java.io.PrintStream! origin=GET_PROPERTY
@@ -52,6 +57,7 @@ FILE fqName:<root> fileName:/coercionToUnit.kt
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'println(String!): Unit' type=kotlin.Unit origin=null
$this: TYPE_OP type=java.io.PrintStream origin=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:PrintStream modality:OPEN visibility:public flags:
GET_VAR 'tmp1_safe_receiver: PrintStream!' type=java.io.PrintStream! origin=null
x: CONST String type=kotlin.String value=world!