Add basic FIR -> IR converter with a set of text tests

Tests duplicate IrTextTestCaseGenerated
#KT-24065 Fixed
This commit is contained in:
Mikhail Glukhikh
2019-04-05 13:37:48 +03:00
parent 92adfd8946
commit 881073b1c9
305 changed files with 22829 additions and 57 deletions
@@ -0,0 +1,37 @@
FILE fqName:<root> fileName:/augmentedAssignment1.kt
PROPERTY name:p visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static]
EXPRESSION_BODY
CONST Int type=kotlin.Int value=0
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-p> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:p visibility:public modality:FINAL [var]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-p> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static] ' type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-p> visibility:public modality:FINAL <> (<set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:p visibility:public modality:FINAL [var]
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static] ' type=kotlin.Unit origin=null
value: GET_VAR '<set-?>: kotlin.Int declared in <root>.<set-p>' type=kotlin.Int origin=null
FUN name:testVariable visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:x type:kotlin.Int [var]
CONST Int type=kotlin.Int value=0
ERROR_CALL 'Unresolved reference: R|<local>/x|' type=IrErrorType
ERROR_CALL 'Unresolved reference: R|<local>/x|' type=IrErrorType
ERROR_CALL 'Unresolved reference: R|<local>/x|' type=IrErrorType
ERROR_CALL 'Unresolved reference: R|<local>/x|' type=IrErrorType
ERROR_CALL 'Unresolved reference: R|<local>/x|' type=IrErrorType
FUN name:testProperty visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static] ' type=kotlin.Int origin=null
value: CONST Int type=kotlin.Int value=1
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static] ' type=kotlin.Int origin=null
value: CONST Int type=kotlin.Int value=2
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static] ' type=kotlin.Int origin=null
value: CONST Int type=kotlin.Int value=3
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static] ' type=kotlin.Int origin=null
value: CONST Int type=kotlin.Int value=4
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static] ' type=kotlin.Int origin=null
value: CONST Int type=kotlin.Int value=5