FIR2IR: support assignments of local variables

This commit is contained in:
Mikhail Glukhikh
2019-05-16 14:24:39 +03:00
parent 68da1a97d1
commit a973a21ec6
15 changed files with 99 additions and 41 deletions
@@ -28,7 +28,9 @@ FILE fqName:<root> fileName:/coercionInLoop.kt
GET_VAR 'var i: kotlin.Int [var] declared in <root>.box' type=kotlin.Int origin=null
VAR name:<unary> type:kotlin.Int [val]
GET_VAR 'var i: kotlin.Int [var] declared in <root>.box' type=kotlin.Int origin=null
ERROR_CALL 'Unresolved reference: R|<local>/i|' type=IrErrorType
SET_VAR 'var i: kotlin.Int [var] declared in <root>.box' type=kotlin.Int origin=null
CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val <unary>: kotlin.Int [val] declared in <root>.box' type=kotlin.Int origin=null
GET_VAR 'val <unary>: kotlin.Int [val] declared in <root>.box' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
CONST String type=kotlin.String value="OK"