Fix type access expression extraction for function/property references

This commit is contained in:
Tamas Vajk
2022-03-01 14:37:58 +01:00
committed by Ian Lynagh
parent 73c5f8c591
commit 4e18974889
5 changed files with 133 additions and 3 deletions

View File

@@ -1687,7 +1687,10 @@ open class KotlinFileExtractor(
) {
typeArgs.forEachIndexed { argIdx, arg ->
val mul = if (reverse) -1 else 1
extractTypeAccess(arg, enclosingCallable, parentExpr, argIdx * mul + startIndex, elementForLocation, enclosingStmt, TypeContext.GENERIC_ARGUMENT)
val ta = extractTypeAccess(arg, enclosingCallable, parentExpr, argIdx * mul + startIndex, elementForLocation, enclosingStmt, TypeContext.GENERIC_ARGUMENT)
if (arg is IrSimpleType) {
extractTypeArguments(arg.arguments.filterIsInstance<IrType>(), elementForLocation, ta, enclosingCallable, enclosingStmt)
}
}
}
@@ -2829,7 +2832,8 @@ open class KotlinFileExtractor(
tw.writeStatementEnclosingExpr(idPropertyRef, exprParent.enclosingStmt)
tw.writeCallableBinding(idPropertyRef, ids.constructor)
extractTypeAccess(kPropertyType, locId, callable, idPropertyRef, -3, exprParent.enclosingStmt)
val typeAccessId = extractTypeAccess(kPropertyType, locId, callable, idPropertyRef, -3, exprParent.enclosingStmt)
extractTypeArguments(parameterTypes, propertyReferenceExpr, typeAccessId, callable, exprParent.enclosingStmt)
helper.extractConstructorArguments(callable, idPropertyRef, exprParent.enclosingStmt)
@@ -2972,7 +2976,9 @@ open class KotlinFileExtractor(
tw.writeStatementEnclosingExpr(idMemberRef, exprParent.enclosingStmt)
tw.writeCallableBinding(idMemberRef, ids.constructor)
extractTypeAccess(fnInterfaceType, locId, callable, idMemberRef, -3, exprParent.enclosingStmt)
val typeAccessId = extractTypeAccess(fnInterfaceType, locId, callable, idMemberRef, -3, exprParent.enclosingStmt)
val typeAccessArguments = if (isBigArity) listOf(parameterTypes.last()) else parameterTypes
extractTypeArguments(typeAccessArguments, functionReferenceExpr, typeAccessId, callable, exprParent.enclosingStmt)
tw.writeMemberRefBinding(idMemberRef, targetCallableId)
@@ -3497,6 +3503,7 @@ open class KotlinFileExtractor(
tw.writeIsAnonymClass(ids.type.javaResult.id as Label<DbClass>, idNewexpr)
extractTypeAccess(e.typeOperand, callable, idNewexpr, -3, e, enclosingStmt)
extractExpressionExpr(e.argument, callable, idNewexpr, 0, enclosingStmt)
}
else -> {

View File

@@ -475,6 +475,8 @@ local_anonymous.kt:
# 21| 0: [MethodAccess] fn3(...)
# 21| -1: [VarAccess] a0
# 21| -3: [TypeAccess] Function1<Class1,Unit>
# 21| 0: [TypeAccess] Class1
# 21| 1: [TypeAccess] Unit
# 24| 6: [Method] fn5
# 24| 5: [BlockStmt] { ... }
# 25| 0: [LocalTypeDeclStmt] class ...

View File

@@ -1548,6 +1548,7 @@ funcExprs.kt:
# 32| 1: [FieldDeclaration] FuncRef <dispatchReceiver>;
# 32| -1: [TypeAccess] FuncRef
# 32| -3: [TypeAccess] Function0<Integer>
# 32| 0: [TypeAccess] Integer
# 32| 0: [ClassInstanceExpr] new FuncRef(...)
# 32| -3: [TypeAccess] FuncRef
# 33| 15: [ExprStmt] <Expr>;
@@ -1573,6 +1574,7 @@ funcExprs.kt:
# 33| 1: [FieldDeclaration] Companion <dispatchReceiver>;
# 33| -1: [TypeAccess] Companion
# 33| -3: [TypeAccess] Function0<Integer>
# 33| 0: [TypeAccess] Integer
# 33| 0: [VarAccess] Companion
# 34| 16: [ExprStmt] <Expr>;
# 34| 0: [MethodAccess] functionExpression1a(...)
@@ -1601,6 +1603,8 @@ funcExprs.kt:
# 34| 1: [FieldDeclaration] FuncRef <dispatchReceiver>;
# 34| -1: [TypeAccess] FuncRef
# 34| -3: [TypeAccess] Function1<Integer,Integer>
# 34| 0: [TypeAccess] Integer
# 34| 1: [TypeAccess] Integer
# 34| 0: [ClassInstanceExpr] new FuncRef(...)
# 34| -3: [TypeAccess] FuncRef
# 35| 17: [ExprStmt] <Expr>;
@@ -1621,6 +1625,9 @@ funcExprs.kt:
# 35| -1: [VarAccess] a0
# 35| 0: [VarAccess] a1
# 35| -3: [TypeAccess] Function2<FuncRef,Integer,Integer>
# 35| 0: [TypeAccess] FuncRef
# 35| 1: [TypeAccess] Integer
# 35| 2: [TypeAccess] Integer
# 36| 18: [ExprStmt] <Expr>;
# 36| 0: [MethodAccess] functionExpression1a(...)
# 36| 0: [IntegerLiteral] 5
@@ -1648,6 +1655,8 @@ funcExprs.kt:
# 36| 1: [FieldDeclaration] int <extensionReceiver>;
# 36| -1: [TypeAccess] int
# 36| -3: [TypeAccess] Function1<Integer,Integer>
# 36| 0: [TypeAccess] Integer
# 36| 1: [TypeAccess] Integer
# 36| 0: [IntegerLiteral] 3
# 37| 19: [ExprStmt] <Expr>;
# 37| 0: [MethodAccess] functionExpression3(...)
@@ -1667,6 +1676,9 @@ funcExprs.kt:
# 37| 0: [VarAccess] a0
# 37| 1: [VarAccess] a1
# 37| -3: [TypeAccess] Function2<Integer,Integer,Integer>
# 37| 0: [TypeAccess] Integer
# 37| 1: [TypeAccess] Integer
# 37| 2: [TypeAccess] Integer
# 38| 20: [ExprStmt] <Expr>;
# 38| 0: [MethodAccess] functionExpression22(...)
# 38| 0: [IntegerLiteral] 5
@@ -1736,6 +1748,29 @@ funcExprs.kt:
# 38| 1: [FieldDeclaration] FuncRef <dispatchReceiver>;
# 38| -1: [TypeAccess] FuncRef
# 38| -3: [TypeAccess] Function22<Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Unit>
# 38| 0: [TypeAccess] Integer
# 38| 1: [TypeAccess] Integer
# 38| 2: [TypeAccess] Integer
# 38| 3: [TypeAccess] Integer
# 38| 4: [TypeAccess] Integer
# 38| 5: [TypeAccess] Integer
# 38| 6: [TypeAccess] Integer
# 38| 7: [TypeAccess] Integer
# 38| 8: [TypeAccess] Integer
# 38| 9: [TypeAccess] Integer
# 38| 10: [TypeAccess] Integer
# 38| 11: [TypeAccess] Integer
# 38| 12: [TypeAccess] Integer
# 38| 13: [TypeAccess] Integer
# 38| 14: [TypeAccess] Integer
# 38| 15: [TypeAccess] Integer
# 38| 16: [TypeAccess] Integer
# 38| 17: [TypeAccess] Integer
# 38| 18: [TypeAccess] Integer
# 38| 19: [TypeAccess] Integer
# 38| 20: [TypeAccess] Integer
# 38| 21: [TypeAccess] Integer
# 38| 22: [TypeAccess] Unit
# 38| 0: [ClassInstanceExpr] new FuncRef(...)
# 38| -3: [TypeAccess] FuncRef
# 39| 21: [ExprStmt] <Expr>;
@@ -1879,6 +1914,7 @@ funcExprs.kt:
# 39| 1: [FieldDeclaration] FuncRef <dispatchReceiver>;
# 39| -1: [TypeAccess] FuncRef
# 39| -3: [TypeAccess] FunctionN<String>
# 39| 0: [TypeAccess] String
# 39| 0: [ClassInstanceExpr] new FuncRef(...)
# 39| -3: [TypeAccess] FuncRef
# 40| 22: [ExprStmt] <Expr>;
@@ -2016,6 +2052,7 @@ funcExprs.kt:
# 40| -1: [VarAccess] a0
# 40| 23: [IntegerLiteral] 23
# 40| -3: [TypeAccess] FunctionN<String>
# 40| 0: [TypeAccess] String
# 42| 23: [LocalTypeDeclStmt] class ...
# 42| 0: [LocalClass]
# 42| 1: [Constructor]
@@ -2037,6 +2074,7 @@ funcExprs.kt:
# 43| 0: [ReturnStmt] return ...
# 43| 0: [MethodAccess] local(...)
# 43| -3: [TypeAccess] Function0<Integer>
# 43| 0: [TypeAccess] Integer
# 45| 25: [ExprStmt] <Expr>;
# 45| 0: [MethodAccess] fn(...)
# 45| -2: [TypeAccess] FuncRef
@@ -2051,6 +2089,7 @@ funcExprs.kt:
# 45| 0: [ClassInstanceExpr] new FuncRef(...)
# 45| -3: [TypeAccess] FuncRef
# 45| -3: [TypeAccess] Function0<FuncRef>
# 45| 0: [TypeAccess] FuncRef
# 52| 14: [Method] fn
#-----| 2: (Generic Parameters)
# 52| 0: [TypeVariable] T
@@ -2355,6 +2394,9 @@ samConversion.kt:
# 5| 0: [VarAccess] a0
# 5| 1: [VarAccess] a1
# 5| -3: [TypeAccess] Function2<Integer,Integer,Unit>
# 5| 0: [TypeAccess] Integer
# 5| 1: [TypeAccess] Integer
# 5| 2: [TypeAccess] Unit
# 7| 3: [LocalVariableDeclStmt] var ...;
# 7| 1: [LocalVariableDeclExpr] i
# 7| 0: [CastExpr] (...)...
@@ -2631,6 +2673,7 @@ samConversion.kt:
# 41| -1: [VarAccess] a0
# 41| 22: [IntegerLiteral] 22
# 41| -3: [TypeAccess] FunctionN<Boolean>
# 41| 0: [TypeAccess] Boolean
# 42| 1: [LocalVariableDeclStmt] var ...;
# 42| 1: [LocalVariableDeclExpr] b
# 42| 0: [CastExpr] (...)...

View File

@@ -930,6 +930,7 @@
| funcExprs.kt:32:26:32:38 | <dispatchReceiver> | funcExprs.kt:32:26:32:38 | | VarAccess |
| funcExprs.kt:32:26:32:38 | FuncRef | file://:0:0:0:0 | <none> | TypeAccess |
| funcExprs.kt:32:26:32:38 | Function0<Integer> | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:32:26:32:38 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:32:26:32:38 | f0(...) | funcExprs.kt:32:26:32:38 | invoke | MethodAccess |
| funcExprs.kt:32:26:32:38 | this | funcExprs.kt:32:26:32:38 | | ThisAccess |
| funcExprs.kt:32:26:32:38 | this | funcExprs.kt:32:26:32:38 | invoke | ThisAccess |
@@ -942,6 +943,7 @@
| funcExprs.kt:33:26:33:36 | <dispatchReceiver> | funcExprs.kt:33:26:33:36 | | VarAccess |
| funcExprs.kt:33:26:33:36 | Companion | file://:0:0:0:0 | <none> | TypeAccess |
| funcExprs.kt:33:26:33:36 | Function0<Integer> | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:33:26:33:36 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:33:26:33:36 | f0(...) | funcExprs.kt:33:26:33:36 | invoke | MethodAccess |
| funcExprs.kt:33:26:33:36 | this | funcExprs.kt:33:26:33:36 | | ThisAccess |
| funcExprs.kt:33:26:33:36 | this | funcExprs.kt:33:26:33:36 | invoke | ThisAccess |
@@ -956,6 +958,8 @@
| funcExprs.kt:34:29:34:41 | <dispatchReceiver> | funcExprs.kt:34:29:34:41 | | VarAccess |
| funcExprs.kt:34:29:34:41 | FuncRef | file://:0:0:0:0 | <none> | TypeAccess |
| funcExprs.kt:34:29:34:41 | Function1<Integer,Integer> | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:34:29:34:41 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:34:29:34:41 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:34:29:34:41 | a0 | funcExprs.kt:34:29:34:41 | invoke | VarAccess |
| funcExprs.kt:34:29:34:41 | f1(...) | funcExprs.kt:34:29:34:41 | invoke | MethodAccess |
| funcExprs.kt:34:29:34:41 | this | funcExprs.kt:34:29:34:41 | | ThisAccess |
@@ -965,7 +969,10 @@
| funcExprs.kt:35:5:35:40 | functionExpression1c(...) | funcExprs.kt:15:1:46:1 | call | MethodAccess |
| funcExprs.kt:35:26:35:26 | 5 | funcExprs.kt:15:1:46:1 | call | IntegerLiteral |
| funcExprs.kt:35:29:35:39 | ...::... | funcExprs.kt:15:1:46:1 | call | MemberRefExpr |
| funcExprs.kt:35:29:35:39 | FuncRef | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:35:29:35:39 | Function2<FuncRef,Integer,Integer> | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:35:29:35:39 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:35:29:35:39 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:35:29:35:39 | a0 | funcExprs.kt:35:29:35:39 | invoke | VarAccess |
| funcExprs.kt:35:29:35:39 | a1 | funcExprs.kt:35:29:35:39 | invoke | VarAccess |
| funcExprs.kt:35:29:35:39 | f1(...) | funcExprs.kt:35:29:35:39 | invoke | MethodAccess |
@@ -976,6 +983,8 @@
| funcExprs.kt:36:29:36:33 | ...=... | funcExprs.kt:36:29:36:33 | | AssignExpr |
| funcExprs.kt:36:29:36:33 | <extensionReceiver> | funcExprs.kt:36:29:36:33 | | VarAccess |
| funcExprs.kt:36:29:36:33 | Function1<Integer,Integer> | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:36:29:36:33 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:36:29:36:33 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:36:29:36:33 | a0 | funcExprs.kt:36:29:36:33 | invoke | VarAccess |
| funcExprs.kt:36:29:36:33 | f3(...) | funcExprs.kt:36:29:36:33 | invoke | MethodAccess |
| funcExprs.kt:36:29:36:33 | int | file://:0:0:0:0 | <none> | TypeAccess |
@@ -987,6 +996,9 @@
| funcExprs.kt:37:25:37:25 | 5 | funcExprs.kt:15:1:46:1 | call | IntegerLiteral |
| funcExprs.kt:37:28:37:34 | ...::... | funcExprs.kt:15:1:46:1 | call | MemberRefExpr |
| funcExprs.kt:37:28:37:34 | Function2<Integer,Integer,Integer> | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:37:28:37:34 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:37:28:37:34 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:37:28:37:34 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:37:28:37:34 | a0 | funcExprs.kt:37:28:37:34 | invoke | VarAccess |
| funcExprs.kt:37:28:37:34 | a1 | funcExprs.kt:37:28:37:34 | invoke | VarAccess |
| funcExprs.kt:37:28:37:34 | f3(...) | funcExprs.kt:37:28:37:34 | invoke | MethodAccess |
@@ -999,6 +1011,29 @@
| funcExprs.kt:38:29:38:42 | <dispatchReceiver> | funcExprs.kt:38:29:38:42 | | VarAccess |
| funcExprs.kt:38:29:38:42 | FuncRef | file://:0:0:0:0 | <none> | TypeAccess |
| funcExprs.kt:38:29:38:42 | Function22<Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Unit> | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | Unit | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:38:29:38:42 | a0 | funcExprs.kt:38:29:38:42 | invoke | VarAccess |
| funcExprs.kt:38:29:38:42 | a1 | funcExprs.kt:38:29:38:42 | invoke | VarAccess |
| funcExprs.kt:38:29:38:42 | a2 | funcExprs.kt:38:29:38:42 | invoke | VarAccess |
@@ -1081,6 +1116,7 @@
| funcExprs.kt:39:29:39:42 | <dispatchReceiver> | funcExprs.kt:39:29:39:42 | | VarAccess |
| funcExprs.kt:39:29:39:42 | FuncRef | file://:0:0:0:0 | <none> | TypeAccess |
| funcExprs.kt:39:29:39:42 | FunctionN<String> | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:39:29:39:42 | String | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:39:29:39:42 | a0 | funcExprs.kt:39:29:39:42 | invoke | VarAccess |
| funcExprs.kt:39:29:39:42 | a0 | funcExprs.kt:39:29:39:42 | invoke | VarAccess |
| funcExprs.kt:39:29:39:42 | a0 | funcExprs.kt:39:29:39:42 | invoke | VarAccess |
@@ -1208,6 +1244,7 @@
| funcExprs.kt:40:30:40:41 | ...::... | funcExprs.kt:15:1:46:1 | call | MemberRefExpr |
| funcExprs.kt:40:30:40:41 | FuncRef | funcExprs.kt:40:30:40:41 | invoke | TypeAccess |
| funcExprs.kt:40:30:40:41 | FunctionN<String> | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:40:30:40:41 | String | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:40:30:40:41 | a0 | funcExprs.kt:40:30:40:41 | invoke | VarAccess |
| funcExprs.kt:40:30:40:41 | a0 | funcExprs.kt:40:30:40:41 | invoke | VarAccess |
| funcExprs.kt:40:30:40:41 | a0 | funcExprs.kt:40:30:40:41 | invoke | VarAccess |
@@ -1284,10 +1321,12 @@
| funcExprs.kt:43:5:43:33 | functionExpression0a(...) | funcExprs.kt:15:1:46:1 | call | MethodAccess |
| funcExprs.kt:43:26:43:32 | ...::... | funcExprs.kt:15:1:46:1 | call | MemberRefExpr |
| funcExprs.kt:43:26:43:32 | Function0<Integer> | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:43:26:43:32 | Integer | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:43:26:43:32 | local(...) | funcExprs.kt:43:26:43:32 | invoke | MethodAccess |
| funcExprs.kt:45:5:45:17 | FuncRef | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:45:5:45:17 | fn(...) | funcExprs.kt:15:1:46:1 | call | MethodAccess |
| funcExprs.kt:45:8:45:16 | ...::... | funcExprs.kt:15:1:46:1 | call | MemberRefExpr |
| funcExprs.kt:45:8:45:16 | FuncRef | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:45:8:45:16 | FuncRef | funcExprs.kt:45:8:45:16 | invoke | TypeAccess |
| funcExprs.kt:45:8:45:16 | Function0<FuncRef> | funcExprs.kt:15:1:46:1 | call | TypeAccess |
| funcExprs.kt:45:8:45:16 | new FuncRef(...) | funcExprs.kt:45:8:45:16 | invoke | ClassInstanceExpr |
@@ -1379,6 +1418,9 @@
| samConversion.kt:5:14:5:32 | this.<fn> | samConversion.kt:5:14:5:32 | | VarAccess |
| samConversion.kt:5:27:5:31 | ...::... | samConversion.kt:1:1:14:1 | main | MemberRefExpr |
| samConversion.kt:5:27:5:31 | Function2<Integer,Integer,Unit> | samConversion.kt:1:1:14:1 | main | TypeAccess |
| samConversion.kt:5:27:5:31 | Integer | samConversion.kt:1:1:14:1 | main | TypeAccess |
| samConversion.kt:5:27:5:31 | Integer | samConversion.kt:1:1:14:1 | main | TypeAccess |
| samConversion.kt:5:27:5:31 | Unit | samConversion.kt:1:1:14:1 | main | TypeAccess |
| samConversion.kt:5:27:5:31 | a0 | samConversion.kt:5:27:5:31 | invoke | VarAccess |
| samConversion.kt:5:27:5:31 | a1 | samConversion.kt:5:27:5:31 | invoke | VarAccess |
| samConversion.kt:5:27:5:31 | fn2(...) | samConversion.kt:5:27:5:31 | invoke | MethodAccess |
@@ -1480,6 +1522,7 @@
| samConversion.kt:41:13:41:16 | (...)... | samConversion.kt:41:13:41:16 | invoke | CastExpr |
| samConversion.kt:41:13:41:16 | (...)... | samConversion.kt:41:13:41:16 | invoke | CastExpr |
| samConversion.kt:41:13:41:16 | ...::... | samConversion.kt:40:1:46:1 | fn | MemberRefExpr |
| samConversion.kt:41:13:41:16 | Boolean | samConversion.kt:40:1:46:1 | fn | TypeAccess |
| samConversion.kt:41:13:41:16 | FunctionN<Boolean> | samConversion.kt:40:1:46:1 | fn | TypeAccess |
| samConversion.kt:41:13:41:16 | a0 | samConversion.kt:41:13:41:16 | invoke | VarAccess |
| samConversion.kt:41:13:41:16 | a0 | samConversion.kt:41:13:41:16 | invoke | VarAccess |

View File

@@ -31,6 +31,8 @@ reflection.kt:
# 48| 0: [MethodAccess] getLastChar(...)
# 48| 0: [VarAccess] a0
# 48| -3: [TypeAccess] KProperty1<String,Character>
# 48| 0: [TypeAccess] String
# 48| 1: [TypeAccess] Character
# 48| 0: [StringLiteral] abc
# 49| 1: [ExprStmt] <Expr>;
# 49| 0: [MethodAccess] println(...)
@@ -57,6 +59,7 @@ reflection.kt:
# 49| 0: [VarAccess] this.<extensionReceiver>
# 49| -1: [ThisAccess] this
# 49| -3: [TypeAccess] KProperty0<Character>
# 49| 0: [TypeAccess] Character
# 49| 0: [StringLiteral] abcd
# 52| 3: [ExtensionMethod] ext1
#-----| 2: (Generic Parameters)
@@ -97,6 +100,9 @@ reflection.kt:
# 5| -1: [VarAccess] a0
# 5| 0: [VarAccess] a1
# 5| -3: [TypeAccess] Function2<Ccc,Integer,Double>
# 5| 0: [TypeAccess] Ccc
# 5| 1: [TypeAccess] Integer
# 5| 2: [TypeAccess] Double
# 6| 1: [ExprStmt] <Expr>;
# 6| 0: [MethodAccess] println(...)
# 6| -1: [TypeAccess] ConsoleKt
@@ -117,6 +123,8 @@ reflection.kt:
# 8| 0: [MethodAccess] getP0(...)
# 8| -1: [VarAccess] a0
# 8| -3: [TypeAccess] KProperty1<C,Integer>
# 8| 0: [TypeAccess] C
# 8| 1: [TypeAccess] Integer
# 9| 3: [LocalVariableDeclStmt] var ...;
# 9| 1: [LocalVariableDeclExpr] x1
# 9| 0: [MethodAccess] get(...)
@@ -157,6 +165,8 @@ reflection.kt:
# 12| 1: [FieldDeclaration] KProperty1<C,Integer> <dispatchReceiver>;
# 12| -1: [TypeAccess] KProperty1<C,Integer>
# 12| -3: [TypeAccess] Function1<C,Integer>
# 12| 0: [TypeAccess] C
# 12| 1: [TypeAccess] Integer
# 12| 0: [VarAccess] x0
# 13| 7: [LocalVariableDeclStmt] var ...;
# 13| 1: [LocalVariableDeclExpr] x5
@@ -181,6 +191,7 @@ reflection.kt:
# 13| -1: [VarAccess] this.<dispatchReceiver>
# 13| -1: [ThisAccess] this
# 13| -3: [TypeAccess] KProperty0<Integer>
# 13| 0: [TypeAccess] Integer
# 13| 0: [ClassInstanceExpr] new C(...)
# 13| -3: [TypeAccess] C
# 15| 8: [LocalVariableDeclStmt] var ...;
@@ -207,6 +218,8 @@ reflection.kt:
# 15| -1: [VarAccess] a0
# 15| 0: [VarAccess] a1
# 15| -3: [TypeAccess] KMutableProperty1<C,Integer>
# 15| 0: [TypeAccess] C
# 15| 1: [TypeAccess] Integer
# 16| 9: [LocalVariableDeclStmt] var ...;
# 16| 1: [LocalVariableDeclExpr] y1
# 16| 0: [MethodAccess] set(...)
@@ -250,6 +263,9 @@ reflection.kt:
# 19| 1: [FieldDeclaration] KMutableProperty1<C,Integer> <dispatchReceiver>;
# 19| -1: [TypeAccess] KMutableProperty1<C,Integer>
# 19| -3: [TypeAccess] Function2<C,Integer,Unit>
# 19| 0: [TypeAccess] C
# 19| 1: [TypeAccess] Integer
# 19| 2: [TypeAccess] Unit
# 19| 0: [VarAccess] y0
# 20| 13: [LocalVariableDeclStmt] var ...;
# 20| 1: [LocalVariableDeclExpr] y5
@@ -283,6 +299,7 @@ reflection.kt:
# 20| -1: [ThisAccess] this
# 20| 0: [VarAccess] a0
# 20| -3: [TypeAccess] KMutableProperty0<Integer>
# 20| 0: [TypeAccess] Integer
# 20| 0: [ClassInstanceExpr] new C(...)
# 20| -3: [TypeAccess] C
# 22| 14: [LocalVariableDeclStmt] var ...;
@@ -410,6 +427,10 @@ reflection.kt:
# 58| -1: [VarAccess] a0
# 58| 0: [VarAccess] a1
# 58| -3: [TypeAccess] Function2<Generic<Integer>,Integer,String>
# 58| 0: [TypeAccess] Generic<Integer>
# 58| 0: [TypeAccess] Integer
# 58| 1: [TypeAccess] Integer
# 58| 2: [TypeAccess] String
# 59| 1: [ExprStmt] <Expr>;
# 59| 0: [MethodAccess] println(...)
# 59| -1: [TypeAccess] ConsoleKt
@@ -437,6 +458,8 @@ reflection.kt:
# 59| 1: [FieldDeclaration] Generic<Integer> <dispatchReceiver>;
# 59| -1: [TypeAccess] Generic<Integer>
# 59| -3: [TypeAccess] Function1<Integer,String>
# 59| 0: [TypeAccess] Integer
# 59| 1: [TypeAccess] String
# 59| 0: [ClassInstanceExpr] new Generic<Integer>(...)
# 59| -3: [TypeAccess] Generic<Integer>
# 59| 0: [TypeAccess] Integer
@@ -457,6 +480,9 @@ reflection.kt:
# 60| -2: [TypeAccess] Integer
# 60| 0: [VarAccess] a0
# 60| -3: [TypeAccess] Function1<Generic<Integer>,String>
# 60| 0: [TypeAccess] Generic<Integer>
# 60| 0: [TypeAccess] Integer
# 60| 1: [TypeAccess] String
# 61| 3: [ExprStmt] <Expr>;
# 61| 0: [MethodAccess] println(...)
# 61| -1: [TypeAccess] ConsoleKt
@@ -482,6 +508,7 @@ reflection.kt:
# 61| 1: [FieldDeclaration] Generic<Integer> <extensionReceiver>;
# 61| -1: [TypeAccess] Generic<Integer>
# 61| -3: [TypeAccess] Function0<String>
# 61| 0: [TypeAccess] String
# 61| 0: [ClassInstanceExpr] new Generic<Integer>(...)
# 61| -3: [TypeAccess] Generic<Integer>
# 61| 0: [TypeAccess] Integer
@@ -501,6 +528,9 @@ reflection.kt:
# 62| 0: [MethodAccess] ext2(...)
# 62| 0: [VarAccess] a0
# 62| -3: [TypeAccess] Function1<Generic<Integer>,String>
# 62| 0: [TypeAccess] Generic<Integer>
# 62| 0: [TypeAccess] Integer
# 62| 1: [TypeAccess] String
# 63| 5: [ExprStmt] <Expr>;
# 63| 0: [MethodAccess] println(...)
# 63| -1: [TypeAccess] ConsoleKt
@@ -525,6 +555,7 @@ reflection.kt:
# 63| 1: [FieldDeclaration] Generic<Integer> <extensionReceiver>;
# 63| -1: [TypeAccess] Generic<Integer>
# 63| -3: [TypeAccess] Function0<String>
# 63| 0: [TypeAccess] String
# 63| 0: [ClassInstanceExpr] new Generic<Integer>(...)
# 63| -3: [TypeAccess] Generic<Integer>
# 63| 0: [TypeAccess] Integer
@@ -553,6 +584,9 @@ reflection.kt:
# 65| -1: [VarAccess] a0
# 65| 0: [VarAccess] a1
# 65| -3: [TypeAccess] KMutableProperty1<Generic<Integer>,Integer>
# 65| 0: [TypeAccess] Generic<Integer>
# 65| 0: [TypeAccess] Integer
# 65| 1: [TypeAccess] Integer
# 66| 7: [ExprStmt] <Expr>;
# 66| 0: [MethodAccess] println(...)
# 66| -1: [TypeAccess] ConsoleKt
@@ -586,6 +620,7 @@ reflection.kt:
# 66| -1: [ThisAccess] this
# 66| 0: [VarAccess] a0
# 66| -3: [TypeAccess] KMutableProperty0<Integer>
# 66| 0: [TypeAccess] Integer
# 66| 0: [ClassInstanceExpr] new Generic<Integer>(...)
# 66| -3: [TypeAccess] Generic<Integer>
# 66| 0: [TypeAccess] Integer