[FIR] Fix local variable tests.
- Mangle names for extension receivers in lambdas - Correctly mark anonymous variables and variables for arguments for destructuring declaration. There is one failure remaining which is cause by lambda type inference differences that leads to FIR having an explicit return from the lambda whereas old frontend leads to an implicit return. This difference is visible in debug stepping that the local variables tests do because the implicit return has the line number of the closing brace of the lambda. This change adds an IrText test to make the difference clear.
This commit is contained in:
committed by
Mikhail Glukhikh
parent
99293de6e9
commit
e1f6c19c83
@@ -22,7 +22,7 @@ FILE fqName:<root> fileName:/initValInLambda.kt
|
||||
$receiver: CONST Int type=kotlin.Int value=1
|
||||
block: FUN_EXPR type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:kotlin.Int) returnType:kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Int
|
||||
$receiver: VALUE_PARAMETER name:$this$run type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<this>: <root>.TestInitValInLambdaCalledOnce declared in <root>.TestInitValInLambdaCalledOnce' type=<root>.TestInitValInLambdaCalledOnce origin=null
|
||||
|
||||
Reference in New Issue
Block a user