Fix expected files, fix type access extraction of file level static declarations

This commit is contained in:
Tamas Vajk
2022-04-14 17:33:04 +02:00
committed by Ian Lynagh
parent 1e529b2563
commit c6a75957e9
17 changed files with 1615 additions and 28 deletions

View File

@@ -1231,7 +1231,7 @@ open class KotlinFileExtractor(
if (dispatchReceiver != null) {
extractExpressionExpr(dispatchReceiver, enclosingCallable, id, -1, enclosingStmt)
} else if (isStaticFunction(callTarget)) {
extractStaticCallTypeAccessQualifier(callTarget, id, locId, enclosingCallable, enclosingStmt)
extractStaticTypeAccessQualifier(callTarget, id, locId, enclosingCallable, enclosingStmt)
}
}
@@ -1250,14 +1250,26 @@ open class KotlinFileExtractor(
extractCallValueArguments(argParent, valueArguments, enclosingStmt, enclosingCallable, idxOffset)
}
private fun extractStaticCallTypeAccessQualifier(target: IrFunction, parentExpr: Label<out DbExprparent>, locId: Label<DbLocation>, enclosingCallable: Label<out DbCallable>, enclosingStmt: Label<out DbStmt>) {
if (target.isStaticMethodOfClass) {
private fun extractStaticTypeAccessQualifier(target: IrDeclaration, parentExpr: Label<out DbExprparent>, locId: Label<DbLocation>, enclosingCallable: Label<out DbCallable>, enclosingStmt: Label<out DbStmt>) {
if (target.isStaticOfClass) {
extractTypeAccessRecursive(target.parentAsClass.toRawType(), locId, parentExpr, -1, enclosingCallable, enclosingStmt)
} else if (target is IrSimpleFunction && target.dispatchReceiverParameter == null && target.parent is IrFile) {
} else if (target.isStaticOfFile) {
extractTypeAccess(useFileClassType(target.parent as IrFile), locId, parentExpr, -1, enclosingCallable, enclosingStmt)
}
}
private val IrDeclaration.isStaticOfClass: Boolean
get() = this.isStatic && parent is IrClass
private val IrDeclaration.isStaticOfFile: Boolean
get() = this.isStatic && parent is IrFile
private val IrDeclaration.isStatic: Boolean
get() = this is IrSimpleFunction && dispatchReceiverParameter == null ||
this is IrField && this.isStatic ||
this is IrEnumEntry
private fun extractCallValueArguments(callId: Label<out DbExprparent>, call: IrFunctionAccessExpression, enclosingStmt: Label<out DbStmt>, enclosingCallable: Label<out DbCallable>, idxOffset: Int) =
extractCallValueArguments(callId, (0 until call.valueArgumentsCount).map { call.getValueArgument(it) }, enclosingStmt, enclosingCallable, idxOffset)
@@ -2487,7 +2499,7 @@ open class KotlinFileExtractor(
if (receiver != null) {
extractExpressionExpr(receiver, callable, id, -1, exprParent.enclosingStmt)
} else if (owner.isStatic) {
extractTypeAccessRecursive(owner.parentAsClass.toRawType(), locId, id, -1, callable, exprParent.enclosingStmt)
extractStaticTypeAccessQualifier(owner, id, locId, callable, exprParent.enclosingStmt)
}
}
is IrGetEnumValue -> {
@@ -2514,7 +2526,7 @@ open class KotlinFileExtractor(
val vId = useEnumEntry(owner)
tw.writeVariableBinding(id, vId)
extractTypeAccessRecursive(e.type, locId, id, -1, callable, exprParent.enclosingStmt)
extractStaticTypeAccessQualifier(owner, id, locId, callable, exprParent.enclosingStmt)
}
is IrSetValue,
is IrSetField -> {
@@ -2576,7 +2588,7 @@ open class KotlinFileExtractor(
if (receiver != null) {
extractExpressionExpr(receiver, callable, lhsId, -1, exprParent.enclosingStmt)
} else if (realField.isStatic) {
extractTypeAccessRecursive(realField.parentAsClass.toRawType(), lhsLocId, lhsId, -1, callable, exprParent.enclosingStmt)
extractStaticTypeAccessQualifier(realField, lhsId, lhsLocId, callable, exprParent.enclosingStmt)
}
}
else -> {
@@ -2988,7 +3000,7 @@ open class KotlinFileExtractor(
useFirstArgAsDispatch = target.owner.dispatchReceiverParameter != null
if (isStaticFunction(target.owner)) {
extractStaticCallTypeAccessQualifier(target.owner, callId, locId, labels.methodId, retId)
extractStaticTypeAccessQualifier(target.owner, callId, locId, labels.methodId, retId)
}
}
}

View File

@@ -2,8 +2,10 @@ classes.kt:
# 0| [CompilationUnit] classes
# 0| 1: [Class] ClassesKt
# 32| 1: [Method] f
# 32| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 32| 0: [Parameter] s
# 32| 0: [TypeAccess] String
# 32| 5: [BlockStmt] { ... }
# 2| 2: [Class] ClassOne
# 2| 1: [Constructor] ClassOne
@@ -14,6 +16,7 @@ classes.kt:
# 4| 1: [Constructor] ClassTwo
#-----| 4: (Parameters)
# 4| 0: [Parameter] arg
# 4| 0: [TypeAccess] int
# 4| 5: [BlockStmt] { ... }
# 4| 0: [SuperConstructorInvocationStmt] super(...)
# 4| 1: [BlockStmt] { ... }
@@ -24,6 +27,7 @@ classes.kt:
# 5| 0: [KtInitializerAssignExpr] ...=...
# 5| 0: [VarAccess] x
# 4| 2: [Method] getArg
# 4| 3: [TypeAccess] int
# 4| 5: [BlockStmt] { ... }
# 4| 0: [ReturnStmt] return ...
# 4| 0: [VarAccess] this.arg
@@ -32,6 +36,7 @@ classes.kt:
# 4| -1: [TypeAccess] int
# 4| 0: [VarAccess] arg
# 5| 4: [Method] getX
# 5| 3: [TypeAccess] int
# 5| 5: [BlockStmt] { ... }
# 5| 0: [ReturnStmt] return ...
# 5| 0: [VarAccess] this.x
@@ -45,16 +50,20 @@ classes.kt:
# 8| 0: [SuperConstructorInvocationStmt] super(...)
# 8| 1: [BlockStmt] { ... }
# 9| 2: [Method] foo
# 9| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 9| 0: [Parameter] arg
# 9| 0: [TypeAccess] int
# 12| 5: [Class] ClassFour
# 12| 1: [Constructor] ClassFour
# 12| 5: [BlockStmt] { ... }
# 12| 0: [SuperConstructorInvocationStmt] super(...)
# 12| 1: [BlockStmt] { ... }
# 13| 2: [Method] foo
# 13| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 13| 0: [Parameter] arg
# 13| 0: [TypeAccess] int
# 13| 5: [BlockStmt] { ... }
# 17| 6: [Class] ClassFive
# 17| 1: [Constructor] ClassFive
@@ -63,9 +72,11 @@ classes.kt:
# 17| 1: [BlockStmt] { ... }
# 20| 7: [Interface] IF1
# 21| 1: [Method] funIF1
# 21| 3: [TypeAccess] Unit
# 21| 5: [BlockStmt] { ... }
# 24| 8: [Interface] IF2
# 25| 1: [Method] funIF2
# 25| 3: [TypeAccess] Unit
# 25| 5: [BlockStmt] { ... }
# 28| 9: [Class] ClassSix
# 28| 1: [Constructor] ClassSix
@@ -75,12 +86,14 @@ classes.kt:
# 29| 2: [Constructor] ClassSix
#-----| 4: (Parameters)
# 29| 0: [Parameter] i
# 29| 0: [TypeAccess] int
# 29| 5: [BlockStmt] { ... }
# 29| 0: [ThisConstructorInvocationStmt] this(...)
# 34| 10: [Class] ClassSeven
# 35| 1: [Constructor] ClassSeven
#-----| 4: (Parameters)
# 35| 0: [Parameter] i
# 35| 0: [TypeAccess] String
# 35| 5: [BlockStmt] { ... }
# 35| 0: [SuperConstructorInvocationStmt] super(...)
# 35| 1: [BlockStmt] { ... }
@@ -100,6 +113,7 @@ classes.kt:
# 36| -1: [TypeAccess] ClassesKt
# 36| 0: [VarAccess] i
# 42| 2: [Method] getX
# 42| 3: [TypeAccess] int
# 42| 5: [BlockStmt] { ... }
# 42| 0: [ReturnStmt] return ...
# 42| 0: [VarAccess] this.x
@@ -109,9 +123,13 @@ classes.kt:
# 42| 0: [IntegerLiteral] 3
# 49| 11: [Class] Direction
# 0| 1: [Method] values
# 0| 3: [TypeAccess] Direction[]
# 0| 0: [TypeAccess] Direction
# 0| 1: [Method] valueOf
# 0| 3: [TypeAccess] Direction
#-----| 4: (Parameters)
# 0| 0: [Parameter] value
# 0| 0: [TypeAccess] String
# 49| 3: [Constructor] Direction
# 49| 5: [BlockStmt] { ... }
# 49| 0: [ExprStmt] <Expr>;
@@ -119,14 +137,27 @@ classes.kt:
# 49| -3: [TypeAccess] Unit
# 49| 0: [TypeAccess] Direction
# 49| 1: [BlockStmt] { ... }
# 50| 4: [FieldDeclaration] Direction NORTH;
# 50| -1: [TypeAccess] Direction
# 50| 5: [FieldDeclaration] Direction SOUTH;
# 50| -1: [TypeAccess] Direction
# 50| 6: [FieldDeclaration] Direction WEST;
# 50| -1: [TypeAccess] Direction
# 50| 7: [FieldDeclaration] Direction EAST;
# 50| -1: [TypeAccess] Direction
# 53| 12: [Class] Color
# 0| 1: [Method] values
# 0| 3: [TypeAccess] Color[]
# 0| 0: [TypeAccess] Color
# 0| 1: [Method] valueOf
# 0| 3: [TypeAccess] Color
#-----| 4: (Parameters)
# 0| 0: [Parameter] value
# 0| 0: [TypeAccess] String
# 53| 3: [Constructor] Color
#-----| 4: (Parameters)
# 53| 0: [Parameter] rgb
# 53| 0: [TypeAccess] int
# 53| 5: [BlockStmt] { ... }
# 53| 0: [ExprStmt] <Expr>;
# 53| 0: [ClassInstanceExpr] new Enum(...)
@@ -137,6 +168,7 @@ classes.kt:
# 53| 0: [KtInitializerAssignExpr] ...=...
# 53| 0: [VarAccess] rgb
# 53| 4: [Method] getRgb
# 53| 3: [TypeAccess] int
# 53| 5: [BlockStmt] { ... }
# 53| 0: [ReturnStmt] return ...
# 53| 0: [VarAccess] this.rgb
@@ -144,6 +176,12 @@ classes.kt:
# 53| 4: [FieldDeclaration] int rgb;
# 53| -1: [TypeAccess] int
# 53| 0: [VarAccess] rgb
# 54| 6: [FieldDeclaration] Color RED;
# 54| -1: [TypeAccess] Color
# 55| 7: [FieldDeclaration] Color GREEN;
# 55| -1: [TypeAccess] Color
# 56| 8: [FieldDeclaration] Color BLUE;
# 56| -1: [TypeAccess] Color
# 59| 13: [Interface] Interface1
# 60| 14: [Interface] Interface2
# 61| 15: [GenericType,Interface,ParameterizedType] Interface3
@@ -155,8 +193,10 @@ classes.kt:
# 63| 0: [SuperConstructorInvocationStmt] super(...)
# 63| 1: [BlockStmt] { ... }
# 64| 2: [Method] getObject1
# 64| 3: [TypeAccess] Object
#-----| 4: (Parameters)
# 64| 0: [Parameter] b
# 64| 0: [TypeAccess] boolean
# 64| 5: [BlockStmt] { ... }
# 65| 0: [ExprStmt] <Expr>;
# 65| 0: [WhenExpr] when ...
@@ -189,6 +229,7 @@ classes.kt:
# 68| 0: [ClassInstanceExpr] new (...)
# 68| -3: [TypeAccess] Object
# 71| 3: [Method] getObject2
# 71| 3: [TypeAccess] Interface1
# 71| 5: [BlockStmt] { ... }
# 72| 0: [ReturnStmt] return ...
# 72| 0: [StmtExpr] <Stmt>
@@ -203,6 +244,7 @@ classes.kt:
# 73| 0: [KtInitializerAssignExpr] ...=...
# 73| 0: [VarAccess] x
# 73| 2: [Method] getX
# 73| 3: [TypeAccess] int
# 73| 5: [BlockStmt] { ... }
# 73| 0: [ReturnStmt] return ...
# 73| 0: [VarAccess] this.x
@@ -211,6 +253,7 @@ classes.kt:
# 73| -1: [TypeAccess] int
# 73| 0: [IntegerLiteral] 1
# 74| 4: [Method] foo
# 74| 3: [TypeAccess] Object
# 74| 5: [BlockStmt] { ... }
# 75| 0: [ReturnStmt] return ...
# 75| 0: [StmtExpr] <Stmt>
@@ -228,6 +271,7 @@ classes.kt:
# 72| 0: [ClassInstanceExpr] new (...)
# 72| -3: [TypeAccess] Object
# 80| 4: [Method] getObject3
# 80| 3: [TypeAccess] Object
# 80| 5: [BlockStmt] { ... }
# 81| 0: [ReturnStmt] return ...
# 81| 0: [StmtExpr] <Stmt>
@@ -242,6 +286,7 @@ classes.kt:
# 81| 0: [ClassInstanceExpr] new (...)
# 81| -3: [TypeAccess] Interface1
# 84| 5: [Method] getObject4
# 84| 3: [TypeAccess] Object
# 84| 5: [BlockStmt] { ... }
# 85| 0: [ReturnStmt] return ...
# 85| 0: [StmtExpr] <Stmt>
@@ -256,6 +301,7 @@ classes.kt:
# 85| 0: [ClassInstanceExpr] new (...)
# 85| -3: [TypeAccess] Object
# 88| 6: [Method] getObject5
# 88| 3: [TypeAccess] Object
# 88| 5: [BlockStmt] { ... }
# 89| 0: [ReturnStmt] return ...
# 89| 0: [StmtExpr] <Stmt>
@@ -335,8 +381,10 @@ classes.kt:
# 109| 0: [SuperConstructorInvocationStmt] super(...)
# 109| 1: [BlockStmt] { ... }
# 110| 2: [Method] fn1
# 110| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 110| 0: [Parameter] p
# 110| 0: [TypeAccess] int
# 110| 5: [BlockStmt] { ... }
# 111| 0: [LocalTypeDeclStmt] class ...
# 111| 0: [Class,GenericType,LocalClass,ParameterizedType] Local1
@@ -347,8 +395,10 @@ classes.kt:
# 111| 0: [SuperConstructorInvocationStmt] super(...)
# 111| 1: [BlockStmt] { ... }
# 112| 2: [Method] foo
# 112| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 112| 0: [Parameter] p
# 112| 0: [TypeAccess] int
# 112| 5: [BlockStmt] { ... }
# 114| 1: [ExprStmt] <Expr>;
# 114| 0: [MethodAccess] foo(...)
@@ -357,8 +407,10 @@ classes.kt:
# 114| 0: [TypeAccess] Integer
# 114| 0: [VarAccess] p
# 117| 3: [Method] fn2
# 117| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 117| 0: [Parameter] p
# 117| 0: [TypeAccess] int
# 117| 5: [BlockStmt] { ... }
# 118| 0: [LocalTypeDeclStmt] class ...
# 118| 0: [LocalClass]
@@ -366,6 +418,7 @@ classes.kt:
# 118| 5: [BlockStmt] { ... }
# 118| 0: [SuperConstructorInvocationStmt] super(...)
# 118| 1: [Method] localFn
# 118| 3: [TypeAccess] Unit
# 118| 5: [BlockStmt] { ... }
# 119| 0: [LocalTypeDeclStmt] class ...
# 119| 0: [Class,GenericType,LocalClass,ParameterizedType] Local2
@@ -376,8 +429,10 @@ classes.kt:
# 119| 0: [SuperConstructorInvocationStmt] super(...)
# 119| 1: [BlockStmt] { ... }
# 120| 2: [Method] foo
# 120| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 120| 0: [Parameter] p
# 120| 0: [TypeAccess] int
# 120| 5: [BlockStmt] { ... }
# 122| 1: [ExprStmt] <Expr>;
# 122| 0: [MethodAccess] foo(...)
@@ -386,8 +441,10 @@ classes.kt:
# 122| 0: [TypeAccess] Integer
# 122| 0: [VarAccess] p
# 126| 4: [Method] fn3
# 126| 3: [TypeAccess] Object
#-----| 4: (Parameters)
# 126| 0: [Parameter] p
# 126| 0: [TypeAccess] int
# 126| 5: [BlockStmt] { ... }
# 127| 0: [ReturnStmt] return ...
# 127| 0: [StmtExpr] <Stmt>
@@ -399,6 +456,7 @@ classes.kt:
# 127| 0: [SuperConstructorInvocationStmt] super(...)
# 127| 1: [BlockStmt] { ... }
# 128| 2: [Method] fn
# 128| 3: [TypeAccess] Unit
# 128| 5: [BlockStmt] { ... }
# 129| 0: [LocalTypeDeclStmt] class ...
# 129| 0: [Class,GenericType,LocalClass,ParameterizedType] Local3
@@ -409,8 +467,10 @@ classes.kt:
# 129| 0: [SuperConstructorInvocationStmt] super(...)
# 129| 1: [BlockStmt] { ... }
# 130| 2: [Method] foo
# 130| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 130| 0: [Parameter] p
# 130| 0: [TypeAccess] int
# 130| 5: [BlockStmt] { ... }
# 132| 1: [ExprStmt] <Expr>;
# 132| 0: [MethodAccess] foo(...)
@@ -425,8 +485,10 @@ generic_anonymous.kt:
# 0| [CompilationUnit] generic_anonymous
# 0| 1: [Class] Generic_anonymousKt
# 11| 1: [Method] stringIdentity
# 11| 3: [TypeAccess] String
#-----| 4: (Parameters)
# 11| 0: [Parameter] s
# 11| 0: [TypeAccess] String
# 11| 5: [BlockStmt] { ... }
# 11| 0: [ReturnStmt] return ...
# 11| 0: [MethodAccess] get(...)
@@ -435,8 +497,10 @@ generic_anonymous.kt:
# 11| 0: [TypeAccess] String
# 11| 0: [VarAccess] s
# 13| 2: [Method] intIdentity
# 13| 3: [TypeAccess] int
#-----| 4: (Parameters)
# 13| 0: [Parameter] i
# 13| 0: [TypeAccess] int
# 13| 5: [BlockStmt] { ... }
# 13| 0: [ReturnStmt] return ...
# 13| 0: [MethodAccess] get(...)
@@ -450,6 +514,7 @@ generic_anonymous.kt:
# 1| 1: [Constructor] Generic
#-----| 4: (Parameters)
# 1| 0: [Parameter] t
# 1| 0: [TypeAccess] T
# 1| 5: [BlockStmt] { ... }
# 1| 0: [SuperConstructorInvocationStmt] super(...)
# 1| 1: [BlockStmt] { ... }
@@ -460,6 +525,7 @@ generic_anonymous.kt:
# 3| 0: [KtInitializerAssignExpr] ...=...
# 3| 0: [VarAccess] x
# 1| 2: [Method] getT
# 1| 3: [TypeAccess] T
# 1| 5: [BlockStmt] { ... }
# 1| 0: [ReturnStmt] return ...
# 1| 0: [VarAccess] this.t
@@ -482,6 +548,7 @@ generic_anonymous.kt:
# 4| 0: [KtInitializerAssignExpr] ...=...
# 4| 0: [VarAccess] member
# 4| 2: [Method] getMember
# 4| 3: [TypeAccess] T
# 4| 5: [BlockStmt] { ... }
# 4| 0: [ReturnStmt] return ...
# 4| 0: [VarAccess] this.member
@@ -495,11 +562,14 @@ generic_anonymous.kt:
# 3| 0: [ClassInstanceExpr] new (...)
# 3| -3: [TypeAccess] Object
# 3| 5: [Method] getX
# 3| 3: [TypeAccess] new Object(...) { ... }
# 3| 0: [TypeAccess] T
# 3| 5: [BlockStmt] { ... }
# 3| 0: [ReturnStmt] return ...
# 3| 0: [VarAccess] this.x
# 3| -1: [ThisAccess] this
# 7| 6: [Method] get
# 7| 3: [TypeAccess] T
# 7| 5: [BlockStmt] { ... }
# 7| 0: [ReturnStmt] return ...
# 7| 0: [MethodAccess] getMember(...)
@@ -513,6 +583,7 @@ local_anonymous.kt:
# 3| 0: [SuperConstructorInvocationStmt] super(...)
# 3| 1: [BlockStmt] { ... }
# 4| 2: [Method] fn1
# 4| 3: [TypeAccess] Object
# 4| 5: [BlockStmt] { ... }
# 5| 0: [ReturnStmt] return ...
# 5| 0: [StmtExpr] <Stmt>
@@ -524,11 +595,13 @@ local_anonymous.kt:
# 5| 0: [SuperConstructorInvocationStmt] super(...)
# 5| 1: [BlockStmt] { ... }
# 6| 2: [Method] fn
# 6| 3: [TypeAccess] Unit
# 6| 5: [BlockStmt] { ... }
# 5| 1: [ExprStmt] <Expr>;
# 5| 0: [ClassInstanceExpr] new (...)
# 5| -3: [TypeAccess] Object
# 10| 3: [Method] fn2
# 10| 3: [TypeAccess] Unit
# 10| 5: [BlockStmt] { ... }
# 11| 0: [LocalTypeDeclStmt] class ...
# 11| 0: [LocalClass]
@@ -536,12 +609,14 @@ local_anonymous.kt:
# 11| 5: [BlockStmt] { ... }
# 11| 0: [SuperConstructorInvocationStmt] super(...)
# 11| 1: [Method] fnLocal
# 11| 3: [TypeAccess] Unit
# 11| 5: [BlockStmt] { ... }
# 12| 1: [ExprStmt] <Expr>;
# 12| 0: [MethodAccess] fnLocal(...)
# 12| -1: [ClassInstanceExpr] new (...)
# 12| -3: [TypeAccess] Object
# 15| 4: [Method] fn3
# 15| 3: [TypeAccess] Unit
# 15| 5: [BlockStmt] { ... }
# 16| 0: [LocalVariableDeclStmt] var ...;
# 16| 1: [LocalVariableDeclExpr] lambda1
@@ -551,9 +626,12 @@ local_anonymous.kt:
# 16| 5: [BlockStmt] { ... }
# 16| 0: [SuperConstructorInvocationStmt] super(...)
# 16| 1: [Method] invoke
# 16| 3: [TypeAccess] int
#-----| 4: (Parameters)
# 16| 0: [Parameter] a
# 16| 0: [TypeAccess] int
# 16| 1: [Parameter] b
# 16| 0: [TypeAccess] int
# 16| 5: [BlockStmt] { ... }
# 16| 0: [ReturnStmt] return ...
# 16| 0: [AddExpr] ... + ...
@@ -571,9 +649,12 @@ local_anonymous.kt:
# 17| 5: [BlockStmt] { ... }
# 17| 0: [SuperConstructorInvocationStmt] super(...)
# 17| 1: [Method] invoke
# 17| 3: [TypeAccess] int
#-----| 4: (Parameters)
# 17| 0: [Parameter] a
# 17| 0: [TypeAccess] int
# 17| 1: [Parameter] b
# 17| 0: [TypeAccess] int
# 17| 5: [BlockStmt] { ... }
# 17| 0: [ReturnStmt] return ...
# 17| 0: [AddExpr] ... + ...
@@ -584,6 +665,7 @@ local_anonymous.kt:
# 17| 1: [TypeAccess] Integer
# 17| 2: [TypeAccess] Integer
# 20| 5: [Method] fn4
# 20| 3: [TypeAccess] Unit
# 20| 5: [BlockStmt] { ... }
# 21| 0: [LocalVariableDeclStmt] var ...;
# 21| 1: [LocalVariableDeclExpr] fnRef
@@ -603,6 +685,7 @@ local_anonymous.kt:
# 21| 0: [TypeAccess] Class1
# 21| 1: [TypeAccess] Unit
# 24| 6: [Method] fn5
# 24| 3: [TypeAccess] Unit
# 24| 5: [BlockStmt] { ... }
# 25| 0: [LocalTypeDeclStmt] class ...
# 25| 0: [LocalClass] LocalClass
@@ -616,6 +699,7 @@ local_anonymous.kt:
# 26| 1: [ClassInstanceExpr] new LocalClass(...)
# 26| -3: [TypeAccess] LocalClass
# 29| 7: [Method] nullableAnonymous
# 29| 3: [TypeAccess] Object
# 29| 5: [BlockStmt] { ... }
# 35| 0: [ReturnStmt] return ...
# 29| 0: [StmtExpr] <Stmt>
@@ -630,13 +714,16 @@ local_anonymous.kt:
# 30| 0: [KtInitializerAssignExpr] ...=...
# 30| 0: [VarAccess] x
# 30| 2: [Method] getX
# 30| 3: [TypeAccess] int
# 30| 5: [BlockStmt] { ... }
# 30| 0: [ReturnStmt] return ...
# 30| 0: [VarAccess] this.x
# 30| -1: [ThisAccess] this
# 30| 2: [Method] setX
# 30| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 30| 0: [Parameter] <set-?>
# 30| 0: [TypeAccess] int
# 30| 5: [BlockStmt] { ... }
# 30| 0: [ExprStmt] <Expr>;
# 30| 0: [AssignExpr] ...=...
@@ -647,6 +734,7 @@ local_anonymous.kt:
# 30| -1: [TypeAccess] int
# 30| 0: [IntegerLiteral] 1
# 32| 5: [Method] member
# 32| 3: [TypeAccess] Unit
# 32| 5: [BlockStmt] { ... }
# 33| 0: [LocalVariableDeclStmt] var ...;
# 33| 1: [LocalVariableDeclExpr] maybeThis
@@ -675,13 +763,16 @@ local_anonymous.kt:
# 40| 0: [KtInitializerAssignExpr] ...=...
# 40| 0: [VarAccess] i
# 40| 2: [Method] getI
# 40| 3: [TypeAccess] Interface2
# 40| 5: [BlockStmt] { ... }
# 40| 0: [ReturnStmt] return ...
# 40| 0: [VarAccess] this.i
# 40| -1: [ThisAccess] this
# 40| 2: [Method] setI
# 40| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 40| 0: [Parameter] <set-?>
# 40| 0: [TypeAccess] Interface2
# 40| 5: [BlockStmt] { ... }
# 40| 0: [ExprStmt] <Expr>;
# 40| 0: [AssignExpr] ...=...

View File

@@ -1,5 +1,7 @@
| generic_anonymous.kt:1:26:1:33 | ...=... | T |
| generic_anonymous.kt:1:26:1:33 | T | T |
| generic_anonymous.kt:1:26:1:33 | T | T |
| generic_anonymous.kt:1:26:1:33 | T | T |
| generic_anonymous.kt:1:26:1:33 | t | T |
| generic_anonymous.kt:1:26:1:33 | t | T |
| generic_anonymous.kt:1:26:1:33 | this | Generic |
@@ -8,6 +10,8 @@
| generic_anonymous.kt:3:3:5:3 | T | T |
| generic_anonymous.kt:3:3:5:3 | new Object(...) { ... } | new Object(...) { ... } |
| generic_anonymous.kt:3:3:5:3 | x | new Object(...) { ... } |
| generic_anonymous.kt:3:11:5:3 | T | T |
| generic_anonymous.kt:3:11:5:3 | new Object(...) { ... } | new Object(...) { ... } |
| generic_anonymous.kt:3:11:5:3 | this | Generic |
| generic_anonymous.kt:3:11:5:3 | this.x | new Object(...) { ... } |
| generic_anonymous.kt:3:19:5:3 | <Stmt> | new Object(...) { ... } |
@@ -15,20 +19,26 @@
| generic_anonymous.kt:3:19:5:3 | new (...) | new Object(...) { ... } |
| generic_anonymous.kt:4:7:4:20 | ...=... | T |
| generic_anonymous.kt:4:7:4:20 | T | T |
| generic_anonymous.kt:4:7:4:20 | T | T |
| generic_anonymous.kt:4:7:4:20 | member | T |
| generic_anonymous.kt:4:7:4:20 | this | new Object(...) { ... } |
| generic_anonymous.kt:4:7:4:20 | this.member | T |
| generic_anonymous.kt:4:20:4:20 | Generic | Generic |
| generic_anonymous.kt:4:20:4:20 | Generic.this | Generic |
| generic_anonymous.kt:4:20:4:20 | getT(...) | T |
| generic_anonymous.kt:7:3:7:22 | T | T |
| generic_anonymous.kt:7:15:7:15 | getX(...) | new Object(...) { ... } |
| generic_anonymous.kt:7:15:7:15 | this | Generic |
| generic_anonymous.kt:7:17:7:22 | getMember(...) | T |
| generic_anonymous.kt:11:1:11:56 | String | String |
| generic_anonymous.kt:11:20:11:28 | String | String |
| generic_anonymous.kt:11:33:11:50 | Generic<String> | Generic<String> |
| generic_anonymous.kt:11:33:11:50 | String | String |
| generic_anonymous.kt:11:33:11:50 | new Generic<String>(...) | Generic<String> |
| generic_anonymous.kt:11:49:11:49 | s | String |
| generic_anonymous.kt:11:52:11:56 | get(...) | String |
| generic_anonymous.kt:13:1:13:47 | int | int |
| generic_anonymous.kt:13:17:13:22 | int | int |
| generic_anonymous.kt:13:27:13:41 | Generic<Integer> | Generic<Integer> |
| generic_anonymous.kt:13:27:13:41 | Integer | Integer |
| generic_anonymous.kt:13:27:13:41 | new Generic<Integer>(...) | Generic<Integer> |

View File

@@ -4,6 +4,7 @@
| Test.kt:3:1:80:1 | { ... } | BlockStmt | Test.kt:3:1:80:1 | super(...) | SuperConstructorInvocationStmt |
| Test.kt:3:8:80:1 | Test | Constructor | file://:0:0:0:0 | <none> | <none> |
| Test.kt:3:8:80:1 | { ... } | BlockStmt | Test.kt:3:8:80:1 | Test | Constructor |
| Test.kt:4:2:79:2 | Unit | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:4:2:79:2 | test | Method | file://:0:0:0:0 | <none> | <none> |
| Test.kt:4:13:79:2 | { ... } | BlockStmt | Test.kt:5:3:5:16 | var ...; | LocalVariableDeclStmt |
| Test.kt:5:3:5:16 | int x | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
@@ -128,7 +129,9 @@
| Test.kt:77:7:77:8 | 40 | IntegerLiteral | Test.kt:77:3:77:8 | ...=... | AssignExpr |
| Test.kt:78:3:78:8 | INSTANCE | VarAccess | Test.kt:78:3:78:8 | return ... | ReturnStmt |
| Test.kt:78:3:78:8 | return ... | ReturnStmt | Test.kt:4:2:79:2 | test | Method |
| Test.kt:82:1:89:1 | int | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:82:1:89:1 | t1 | Method | file://:0:0:0:0 | <none> | <none> |
| Test.kt:82:8:82:13 | Object | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:82:8:82:13 | o | Parameter | file://:0:0:0:0 | <none> | <none> |
| Test.kt:82:21:89:1 | { ... } | BlockStmt | Test.kt:83:2:88:2 | try ... | TryStmt |
| Test.kt:83:2:88:2 | try ... | TryStmt | Test.kt:83:6:86:2 | { ... } | BlockStmt |
@@ -149,7 +152,9 @@
| Test.kt:86:34:88:2 | { ... } | BlockStmt | Test.kt:87:10:87:10 | 2 | IntegerLiteral |
| Test.kt:87:3:87:10 | return ... | ReturnStmt | Test.kt:82:1:89:1 | t1 | Method |
| Test.kt:87:10:87:10 | 2 | IntegerLiteral | Test.kt:87:3:87:10 | return ... | ReturnStmt |
| Test.kt:91:1:98:1 | int | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:91:1:98:1 | t2 | Method | file://:0:0:0:0 | <none> | <none> |
| Test.kt:91:8:91:14 | Object | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:91:8:91:14 | o | Parameter | file://:0:0:0:0 | <none> | <none> |
| Test.kt:91:22:98:1 | { ... } | BlockStmt | Test.kt:92:2:97:2 | try ... | TryStmt |
| Test.kt:92:2:97:2 | try ... | TryStmt | Test.kt:92:6:95:2 | { ... } | BlockStmt |
@@ -169,8 +174,11 @@
| Test.kt:95:36:97:2 | { ... } | BlockStmt | Test.kt:96:10:96:10 | 2 | IntegerLiteral |
| Test.kt:96:3:96:10 | return ... | ReturnStmt | Test.kt:91:1:98:1 | t2 | Method |
| Test.kt:96:10:96:10 | 2 | IntegerLiteral | Test.kt:96:3:96:10 | return ... | ReturnStmt |
| Test.kt:100:1:110:1 | Unit | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:100:1:110:1 | fn | Method | file://:0:0:0:0 | <none> | <none> |
| Test.kt:100:8:100:13 | Object | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:100:8:100:13 | x | Parameter | file://:0:0:0:0 | <none> | <none> |
| Test.kt:100:16:100:22 | Object | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:100:16:100:22 | y | Parameter | file://:0:0:0:0 | <none> | <none> |
| Test.kt:100:25:110:1 | { ... } | BlockStmt | Test.kt:101:5:103:5 | <Expr>; | ExprStmt |
| Test.kt:101:5:103:5 | ... -> ... | WhenBranch | Test.kt:101:9:101:30 | when ... | WhenExpr |

View File

@@ -2,19 +2,26 @@ dc.kt:
# 0| [CompilationUnit] dc
# 1| 1: [Class] ProtoMapValue
# 0| 1: [Method] component1
# 0| 3: [TypeAccess] byte[]
# 0| 5: [BlockStmt] { ... }
# 0| 0: [ReturnStmt] return ...
# 0| 0: [VarAccess] this.bytes
# 0| -1: [ThisAccess] this
# 0| 1: [Method] component2
# 0| 3: [TypeAccess] String[]
# 0| 0: [TypeAccess] String
# 0| 5: [BlockStmt] { ... }
# 0| 0: [ReturnStmt] return ...
# 0| 0: [VarAccess] this.strs
# 0| -1: [ThisAccess] this
# 0| 1: [Method] copy
# 0| 3: [TypeAccess] ProtoMapValue
#-----| 4: (Parameters)
# 1| 0: [Parameter] bytes
# 1| 0: [TypeAccess] byte[]
# 1| 1: [Parameter] strs
# 1| 0: [TypeAccess] String[]
# 1| 0: [TypeAccess] String
# 0| 5: [BlockStmt] { ... }
# 0| 0: [ReturnStmt] return ...
# 0| 0: [ClassInstanceExpr] new ProtoMapValue(...)
@@ -22,6 +29,7 @@ dc.kt:
# 0| 0: [VarAccess] bytes
# 0| 1: [VarAccess] strs
# 0| 1: [Method] toString
# 0| 3: [TypeAccess] String
# 0| 5: [BlockStmt] { ... }
# 0| 0: [ReturnStmt] return ...
# 0| 0: [StringTemplateExpr] "..."
@@ -39,6 +47,7 @@ dc.kt:
# 0| -1: [ThisAccess] this
# 0| 6: [StringLiteral] )
# 0| 1: [Method] hashCode
# 0| 3: [TypeAccess] int
# 0| 5: [BlockStmt] { ... }
# 0| 0: [LocalVariableDeclStmt] var ...;
# 0| 1: [LocalVariableDeclExpr] result
@@ -60,8 +69,10 @@ dc.kt:
# 0| 2: [ReturnStmt] return ...
# 0| 0: [VarAccess] result
# 0| 1: [Method] equals
# 0| 3: [TypeAccess] boolean
#-----| 4: (Parameters)
# 0| 0: [Parameter] other
# 0| 0: [TypeAccess] Object
# 0| 5: [BlockStmt] { ... }
# 0| 0: [ExprStmt] <Expr>;
# 0| 0: [WhenExpr] when ...
@@ -109,7 +120,10 @@ dc.kt:
# 1| 7: [Constructor] ProtoMapValue
#-----| 4: (Parameters)
# 1| 0: [Parameter] bytes
# 1| 0: [TypeAccess] byte[]
# 1| 1: [Parameter] strs
# 1| 0: [TypeAccess] String[]
# 1| 0: [TypeAccess] String
# 1| 5: [BlockStmt] { ... }
# 1| 0: [SuperConstructorInvocationStmt] super(...)
# 1| 1: [BlockStmt] { ... }
@@ -120,6 +134,7 @@ dc.kt:
# 1| 0: [KtInitializerAssignExpr] ...=...
# 1| 0: [VarAccess] strs
# 1| 8: [Method] getBytes
# 1| 3: [TypeAccess] byte[]
# 1| 5: [BlockStmt] { ... }
# 1| 0: [ReturnStmt] return ...
# 1| 0: [VarAccess] this.bytes
@@ -128,6 +143,8 @@ dc.kt:
# 1| -1: [TypeAccess] byte[]
# 1| 0: [VarAccess] bytes
# 1| 10: [Method] getStrs
# 1| 3: [TypeAccess] String[]
# 1| 0: [TypeAccess] String
# 1| 5: [BlockStmt] { ... }
# 1| 0: [ReturnStmt] return ...
# 1| 0: [VarAccess] this.strs

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -2,8 +2,11 @@
| test.kt:0:0:0:0 | TestKt | Class |
| test.kt:0:0:0:0 | test | CompilationUnit |
| test.kt:2:1:4:1 | bar | ExtensionMethod |
| test.kt:2:1:4:1 | boolean | TypeAccess |
| test.kt:2:6:2:6 | T | TypeVariable |
| test.kt:2:9:2:14 | <this> | Parameter |
| test.kt:2:9:2:14 | Foo<T> | TypeAccess |
| test.kt:2:9:2:14 | T | TypeAccess |
| test.kt:2:31:4:1 | { ... } | BlockStmt |
| test.kt:3:5:3:15 | return ... | ReturnStmt |
| test.kt:3:12:3:15 | true | BooleanLiteral |
@@ -13,6 +16,7 @@
| test.kt:6:1:10:1 | { ... } | BlockStmt |
| test.kt:6:1:10:1 | { ... } | BlockStmt |
| test.kt:6:11:6:11 | T | TypeVariable |
| test.kt:7:5:9:5 | boolean | TypeAccess |
| test.kt:7:5:9:5 | foo | Method |
| test.kt:7:24:9:5 | { ... } | BlockStmt |
| test.kt:8:9:8:20 | return ... | ReturnStmt |

View File

@@ -4,22 +4,30 @@ generics.kt:
# 3| 1: [ExtensionMethod] f0
#-----| 2: (Generic Parameters)
# 3| 0: [TypeVariable] S
# 3| 3: [TypeAccess] S
#-----| 4: (Parameters)
# 3| 0: [Parameter] <this>
# 3| 0: [TypeAccess] int
# 3| 1: [Parameter] s
# 3| 0: [TypeAccess] S
# 3| 5: [BlockStmt] { ... }
# 4| 0: [ReturnStmt] return ...
# 4| 0: [VarAccess] s
# 7| 2: [ExtensionMethod] f1
#-----| 2: (Generic Parameters)
# 7| 0: [TypeVariable] S
# 7| 3: [TypeAccess] C0<S>
# 7| 0: [TypeAccess] S
#-----| 4: (Parameters)
# 7| 0: [Parameter] <this>
# 7| 0: [TypeAccess] int
# 7| 1: [Parameter] s
# 7| 0: [TypeAccess] S
# 7| 5: [BlockStmt] { ... }
# 8| 0: [ReturnStmt] return ...
# 8| 0: [NullLiteral] null
# 24| 3: [Method] m
# 24| 3: [TypeAccess] Unit
# 24| 5: [BlockStmt] { ... }
# 25| 0: [LocalVariableDeclStmt] var ...;
# 25| 1: [LocalVariableDeclExpr] c1
@@ -83,6 +91,7 @@ generics.kt:
# 13| 1: [Constructor] C1
#-----| 4: (Parameters)
# 13| 0: [Parameter] t
# 13| 0: [TypeAccess] T
# 13| 5: [BlockStmt] { ... }
# 13| 0: [SuperConstructorInvocationStmt] super(...)
# 13| 1: [BlockStmt] { ... }
@@ -90,6 +99,7 @@ generics.kt:
# 13| 0: [KtInitializerAssignExpr] ...=...
# 13| 0: [VarAccess] t
# 13| 2: [Method] getT
# 13| 3: [TypeAccess] T
# 13| 5: [BlockStmt] { ... }
# 13| 0: [ReturnStmt] return ...
# 13| 0: [VarAccess] this.t
@@ -98,14 +108,20 @@ generics.kt:
# 13| -1: [TypeAccess] T
# 13| 0: [VarAccess] t
# 14| 4: [Method] f1
# 14| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 14| 0: [Parameter] t
# 14| 0: [TypeAccess] T
# 14| 5: [BlockStmt] { ... }
# 15| 5: [Method] f2
#-----| 2: (Generic Parameters)
# 15| 0: [TypeVariable] U
# 15| 3: [TypeAccess] C1<U,U>
# 15| 0: [TypeAccess] U
# 15| 1: [TypeAccess] U
#-----| 4: (Parameters)
# 15| 0: [Parameter] u
# 15| 0: [TypeAccess] U
# 15| 5: [BlockStmt] { ... }
# 16| 0: [ReturnStmt] return ...
# 16| 0: [ClassInstanceExpr] new C1<U,U>(...)
@@ -121,8 +137,10 @@ generics.kt:
# 21| 2: [Method] f4
#-----| 2: (Generic Parameters)
# 21| 0: [TypeVariable] P
# 21| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 21| 0: [Parameter] p
# 21| 0: [TypeAccess] P
# 21| 5: [BlockStmt] { ... }
# 36| 7: [Class,GenericType,ParameterizedType] BoundedTest
#-----| -2: (Generic Parameters)
@@ -133,9 +151,12 @@ generics.kt:
# 36| 0: [SuperConstructorInvocationStmt] super(...)
# 36| 1: [BlockStmt] { ... }
# 38| 2: [Method] m
# 38| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 38| 0: [Parameter] s
# 38| 0: [TypeAccess] S
# 38| 1: [Parameter] t
# 38| 0: [TypeAccess] T
# 38| 5: [BlockStmt] { ... }
# 42| 8: [Class,GenericType,ParameterizedType] Outer
#-----| -2: (Generic Parameters)
@@ -154,11 +175,16 @@ generics.kt:
# 43| 0: [SuperConstructorInvocationStmt] super(...)
# 43| 1: [BlockStmt] { ... }
# 44| 2: [Method] fn1
# 44| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 44| 0: [Parameter] t1
# 44| 0: [TypeAccess] T1
# 44| 1: [Parameter] t2
# 44| 0: [TypeAccess] T2
# 44| 2: [Parameter] t3
# 44| 0: [TypeAccess] T3
# 44| 3: [Parameter] t4
# 44| 0: [TypeAccess] T4
# 44| 5: [BlockStmt] { ... }
# 45| 0: [LocalVariableDeclStmt] var ...;
# 45| 1: [LocalVariableDeclExpr] c
@@ -177,9 +203,12 @@ generics.kt:
# 49| 0: [SuperConstructorInvocationStmt] super(...)
# 49| 1: [BlockStmt] { ... }
# 50| 2: [Method] fn2
# 50| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 50| 0: [Parameter] t3
# 50| 0: [TypeAccess] T3
# 50| 1: [Parameter] t4
# 50| 0: [TypeAccess] T4
# 50| 5: [BlockStmt] { ... }
# 51| 0: [LocalVariableDeclStmt] var ...;
# 51| 1: [LocalVariableDeclExpr] c
@@ -197,8 +226,10 @@ generics.kt:
# 57| 2: [Method] fn1
#-----| 2: (Generic Parameters)
# 57| 0: [TypeVariable] T2
# 57| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 57| 0: [Parameter] t
# 57| 0: [TypeAccess] T2
# 57| 5: [BlockStmt] { ... }
# 58| 0: [LocalTypeDeclStmt] class ...
# 58| 0: [Class,GenericType,LocalClass,ParameterizedType] Local
@@ -211,9 +242,12 @@ generics.kt:
# 59| 2: [Method] fn2
#-----| 2: (Generic Parameters)
# 59| 0: [TypeVariable] T4
# 59| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 59| 0: [Parameter] t2
# 59| 0: [TypeAccess] T2
# 59| 1: [Parameter] t4
# 59| 0: [TypeAccess] T4
# 59| 5: [BlockStmt] { ... }
# 61| 1: [ExprStmt] <Expr>;
# 61| 0: [MethodAccess] fn2(...)

View File

@@ -6,7 +6,7 @@ public class Test {
interface ParentIf {
void inheritedInterfaceMethod();
void inheritedInterfaceMethodJ();
}
@@ -25,7 +25,7 @@ class Child extends Test {
c.hashCode();
c.inheritMe();
ChildIf c2 = null;
c2.inheritedInterfaceMethod();
c2.inheritedInterfaceMethodJ();
}

View File

@@ -6,7 +6,7 @@ open class TestKt {
interface ParentIf {
fun inheritedInterfaceMethod()
fun inheritedInterfaceMethodK()
}
@@ -25,7 +25,7 @@ class ChildKt : TestKt() {
c.hashCode()
c.inheritMe()
val c2: ParentIf? = null
c2?.inheritedInterfaceMethod()
c2?.inheritedInterfaceMethodK()
}

View File

@@ -2,9 +2,9 @@
| Test.java:24:5:24:15 | equals(...) | equals | Object |
| Test.java:25:5:25:16 | hashCode(...) | hashCode | Object |
| Test.java:26:5:26:17 | inheritMe(...) | inheritMe | Test |
| Test.java:28:5:28:33 | inheritedInterfaceMethod(...) | inheritedInterfaceMethod | ParentIf |
| Test.java:28:5:28:34 | inheritedInterfaceMethodJ(...) | inheritedInterfaceMethodJ | ParentIf |
| Test.kt:23:7:23:16 | toString(...) | toString | Any |
| Test.kt:24:7:24:15 | equals(...) | equals | Any |
| Test.kt:25:7:25:16 | hashCode(...) | hashCode | Any |
| Test.kt:26:7:26:17 | inheritMe(...) | inheritMe | TestKt |
| Test.kt:28:9:28:34 | inheritedInterfaceMethod(...) | inheritedInterfaceMethod | ParentIf |
| Test.kt:28:9:28:35 | inheritedInterfaceMethodK(...) | inheritedInterfaceMethodK | ParentIf |

View File

@@ -10,8 +10,10 @@ Use.kt:
# 0| [CompilationUnit] Use
# 0| 1: [Class] UseKt
# 2| 1: [Method] use
# 2| 3: [TypeAccess] String
#-----| 4: (Parameters)
# 2| 0: [Parameter] prop
# 2| 0: [TypeAccess] Prop
# 2| 5: [BlockStmt] { ... }
# 3| 0: [ReturnStmt] return ...
# 3| 0: [ImplicitNotNullExpr] <implicit not null>

View File

@@ -1,5 +1,22 @@
| methods2.kt:4:1:5:1 | Unit | TypeAccess |
| methods2.kt:4:26:4:31 | int | TypeAccess |
| methods2.kt:4:34:4:39 | int | TypeAccess |
| methods2.kt:8:5:9:5 | Unit | TypeAccess |
| methods2.kt:8:27:8:32 | int | TypeAccess |
| methods2.kt:8:35:8:40 | int | TypeAccess |
| methods3.kt:3:1:3:42 | Unit | TypeAccess |
| methods3.kt:3:5:3:7 | int | TypeAccess |
| methods3.kt:3:33:3:38 | int | TypeAccess |
| methods3.kt:6:5:6:46 | Unit | TypeAccess |
| methods3.kt:6:9:6:11 | int | TypeAccess |
| methods3.kt:6:37:6:42 | int | TypeAccess |
| methods4.kt:7:5:7:34 | Unit | TypeAccess |
| methods4.kt:7:11:7:29 | InsideNestedTest | TypeAccess |
| methods5.kt:3:1:11:1 | Unit | TypeAccess |
| methods5.kt:4:3:4:11 | x | LocalVariableDeclExpr |
| methods5.kt:4:11:4:11 | 5 | IntegerLiteral |
| methods5.kt:5:3:5:27 | int | TypeAccess |
| methods5.kt:5:13:5:18 | int | TypeAccess |
| methods5.kt:5:23:5:23 | i | VarAccess |
| methods5.kt:5:23:5:27 | ... + ... | AddExpr |
| methods5.kt:5:27:5:27 | x | VarAccess |
@@ -16,6 +33,10 @@
| methods5.kt:8:3:8:3 | x | VarAccess |
| methods5.kt:8:3:8:7 | ...=... | AssignExpr |
| methods5.kt:8:7:8:7 | 7 | IntegerLiteral |
| methods5.kt:9:3:9:32 | int | TypeAccess |
| methods5.kt:9:12:9:17 | C1<T1> | TypeAccess |
| methods5.kt:9:12:9:17 | T1 | TypeAccess |
| methods5.kt:9:22:9:27 | int | TypeAccess |
| methods5.kt:9:32:9:32 | 5 | IntegerLiteral |
| methods5.kt:10:3:10:11 | C1<Integer> | TypeAccess |
| methods5.kt:10:3:10:11 | Integer | TypeAccess |
@@ -27,6 +48,15 @@
| methods5.kt:10:13:10:18 | f1(...) | MethodAccess |
| methods5.kt:10:13:10:18 | new (...) | ClassInstanceExpr |
| methods5.kt:10:16:10:17 | 42 | IntegerLiteral |
| methods.kt:2:1:3:1 | Unit | TypeAccess |
| methods.kt:2:20:2:25 | int | TypeAccess |
| methods.kt:2:28:2:33 | int | TypeAccess |
| methods.kt:6:5:7:5 | Unit | TypeAccess |
| methods.kt:6:21:6:26 | int | TypeAccess |
| methods.kt:6:29:6:34 | int | TypeAccess |
| methods.kt:9:5:12:5 | Unit | TypeAccess |
| methods.kt:9:28:9:33 | int | TypeAccess |
| methods.kt:9:36:9:41 | int | TypeAccess |
| methods.kt:10:9:10:25 | classMethod(...) | MethodAccess |
| methods.kt:10:9:10:25 | this | ThisAccess |
| methods.kt:10:21:10:21 | a | VarAccess |
@@ -35,3 +65,8 @@
| methods.kt:11:9:11:28 | topLevelMethod(...) | MethodAccess |
| methods.kt:11:24:11:24 | b | VarAccess |
| methods.kt:11:27:11:27 | 4 | IntegerLiteral |
| methods.kt:14:12:14:29 | Unit | TypeAccess |
| methods.kt:15:15:15:35 | Unit | TypeAccess |
| methods.kt:16:13:16:31 | Unit | TypeAccess |
| methods.kt:17:14:17:33 | Unit | TypeAccess |
| methods.kt:18:5:18:36 | Unit | TypeAccess |

View File

@@ -2,8 +2,10 @@ reflection.kt:
# 0| [CompilationUnit] reflection
# 0| 1: [Class] ReflectionKt
# 47| 1: [ExtensionMethod] getLastChar
# 47| 3: [TypeAccess] char
#-----| 4: (Parameters)
# 46| 0: [Parameter] <this>
# 46| 0: [TypeAccess] String
# 47| 5: [BlockStmt] { ... }
# 47| 0: [ReturnStmt] return ...
# 47| 0: [MethodAccess] get(...)
@@ -13,6 +15,7 @@ reflection.kt:
# 47| -1: [ExtensionReceiverAccess] this
# 47| 1: [IntegerLiteral] 1
# 49| 2: [Method] fn2
# 49| 3: [TypeAccess] Unit
# 49| 5: [BlockStmt] { ... }
# 50| 0: [ExprStmt] <Expr>;
# 50| 0: [MethodAccess] println(...)
@@ -79,15 +82,21 @@ reflection.kt:
# 54| 3: [ExtensionMethod] ext1
#-----| 2: (Generic Parameters)
# 54| 0: [TypeVariable] T2
# 54| 3: [TypeAccess] String
#-----| 4: (Parameters)
# 54| 0: [Parameter] <this>
# 54| 0: [TypeAccess] Generic<T2>
# 54| 0: [TypeAccess] T2
# 54| 5: [BlockStmt] { ... }
# 54| 0: [ReturnStmt] return ...
# 54| 0: [MethodAccess] toString(...)
# 54| -1: [ExtensionReceiverAccess] this
# 56| 4: [ExtensionMethod] ext2
# 56| 3: [TypeAccess] String
#-----| 4: (Parameters)
# 56| 0: [Parameter] <this>
# 56| 0: [TypeAccess] Generic<Integer>
# 56| 0: [TypeAccess] Integer
# 56| 5: [BlockStmt] { ... }
# 56| 0: [ReturnStmt] return ...
# 56| 0: [MethodAccess] toString(...)
@@ -95,10 +104,13 @@ reflection.kt:
# 94| 5: [Method] fn
#-----| 2: (Generic Parameters)
# 94| 0: [TypeVariable] T
# 94| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 94| 0: [Parameter] value
# 94| 0: [TypeAccess] T
# 94| 5: [BlockStmt] { ... }
# 96| 6: [Method] test
# 96| 3: [TypeAccess] Unit
# 96| 5: [BlockStmt] { ... }
# 97| 0: [ExprStmt] <Expr>;
# 97| 0: [MethodAccess] fn11(...)
@@ -194,30 +206,45 @@ reflection.kt:
#-----| 2: (Generic Parameters)
# 102| 0: [TypeVariable] T
# 102| 1: [TypeVariable] R
# 102| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 102| 0: [Parameter] l
# 102| 0: [TypeAccess] T
# 102| 1: [Parameter] transform
# 102| 0: [TypeAccess] Function1<T,R>
# 102| 0: [TypeAccess] T
# 102| 1: [TypeAccess] R
# 102| 5: [BlockStmt] { ... }
# 103| 8: [Method] fn12
#-----| 2: (Generic Parameters)
# 103| 0: [TypeVariable] T1
# 103| 1: [TypeVariable] R
# 103| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 103| 0: [Parameter] l
# 103| 0: [TypeAccess] T1
# 103| 1: [Parameter] l2
# 103| 0: [TypeAccess] Function1<T1,R>
# 103| 0: [TypeAccess] T1
# 103| 1: [TypeAccess] R
# 103| 5: [BlockStmt] { ... }
# 121| 9: [Method] fn1
# 121| 3: [TypeAccess] int
# 121| 5: [BlockStmt] { ... }
# 121| 0: [ReturnStmt] return ...
# 121| 0: [IntegerLiteral] 5
# 123| 10: [Method] fn2
# 123| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 123| 0: [Parameter] f
# 123| 0: [TypeAccess] Function0<Unit>
# 123| 0: [TypeAccess] Unit
# 123| 5: [BlockStmt] { ... }
# 123| 0: [ReturnStmt] return ...
# 123| 0: [MethodAccess] invoke(...)
# 123| -1: [VarAccess] f
# 125| 11: [Method] adapted
# 125| 3: [TypeAccess] Unit
# 125| 5: [BlockStmt] { ... }
# 126| 0: [ExprStmt] <Expr>;
# 126| 0: [MethodAccess] fn2(...)
@@ -230,6 +257,7 @@ reflection.kt:
# 126| 5: [BlockStmt] { ... }
# 126| 0: [SuperConstructorInvocationStmt] super(...)
# 126| 1: [Method] fn1
# 126| 3: [TypeAccess] Unit
# 126| 5: [BlockStmt] { ... }
# 126| 0: [ExprStmt] <Expr>;
# 126| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
@@ -255,6 +283,7 @@ reflection.kt:
# 5| 0: [SuperConstructorInvocationStmt] super(...)
# 5| 1: [BlockStmt] { ... }
# 6| 2: [Method] fn
# 6| 3: [TypeAccess] Unit
# 6| 5: [BlockStmt] { ... }
# 7| 0: [LocalVariableDeclStmt] var ...;
# 7| 1: [LocalVariableDeclExpr] ref
@@ -524,8 +553,10 @@ reflection.kt:
# 24| 5: [BlockStmt] { ... }
# 24| 0: [SuperConstructorInvocationStmt] super(...)
# 24| 1: [Method] invoke
# 24| 3: [TypeAccess] boolean
#-----| 4: (Parameters)
# 24| 0: [Parameter] it
# 24| 0: [TypeAccess] KCallable<?>
# 24| 5: [BlockStmt] { ... }
# 24| 0: [ReturnStmt] return ...
# 24| 0: [ValueEQExpr] ... (value equals) ...
@@ -548,8 +579,10 @@ reflection.kt:
# 28| 0: [SuperConstructorInvocationStmt] super(...)
# 28| 1: [BlockStmt] { ... }
# 29| 2: [Method] m
# 29| 3: [TypeAccess] double
#-----| 4: (Parameters)
# 29| 0: [Parameter] i
# 29| 0: [TypeAccess] int
# 29| 5: [BlockStmt] { ... }
# 29| 0: [ReturnStmt] return ...
# 29| 0: [DoubleLiteral] 5.0
@@ -565,6 +598,7 @@ reflection.kt:
# 34| 0: [KtInitializerAssignExpr] ...=...
# 34| 0: [VarAccess] p1
# 33| 2: [Method] getP0
# 33| 3: [TypeAccess] int
# 33| 5: [BlockStmt] { ... }
# 33| 0: [ReturnStmt] return ...
# 33| 0: [VarAccess] this.p0
@@ -573,13 +607,16 @@ reflection.kt:
# 33| -1: [TypeAccess] int
# 33| 0: [IntegerLiteral] 1
# 34| 4: [Method] getP1
# 34| 3: [TypeAccess] int
# 34| 5: [BlockStmt] { ... }
# 34| 0: [ReturnStmt] return ...
# 34| 0: [VarAccess] this.p1
# 34| -1: [ThisAccess] this
# 34| 4: [Method] setP1
# 34| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 34| 0: [Parameter] <set-?>
# 34| 0: [TypeAccess] int
# 34| 5: [BlockStmt] { ... }
# 34| 0: [ExprStmt] <Expr>;
# 34| 0: [AssignExpr] ...=...
@@ -590,25 +627,33 @@ reflection.kt:
# 34| -1: [TypeAccess] int
# 34| 0: [IntegerLiteral] 2
# 36| 7: [Method] getP2
# 36| 3: [TypeAccess] int
# 36| 5: [BlockStmt] { ... }
# 36| 0: [ReturnStmt] return ...
# 36| 0: [IntegerLiteral] 1
# 37| 8: [Method] setP2
# 37| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 37| 0: [Parameter] value
# 37| 0: [TypeAccess] int
# 37| 5: [BlockStmt] { ... }
# 37| 0: [ReturnStmt] return ...
# 37| 0: [VarAccess] INSTANCE
# 40| 9: [ExtensionMethod] getP3
# 40| 3: [TypeAccess] int
#-----| 4: (Parameters)
# 39| 0: [Parameter] <this>
# 39| 0: [TypeAccess] int
# 40| 5: [BlockStmt] { ... }
# 40| 0: [ReturnStmt] return ...
# 40| 0: [IntegerLiteral] 1
# 41| 10: [ExtensionMethod] setP3
# 41| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 39| 0: [Parameter] <this>
# 39| 0: [TypeAccess] int
# 41| 1: [Parameter] value
# 41| 0: [TypeAccess] int
# 41| 5: [BlockStmt] { ... }
# 41| 0: [ReturnStmt] return ...
# 41| 0: [VarAccess] INSTANCE
@@ -618,6 +663,7 @@ reflection.kt:
# 58| 0: [SuperConstructorInvocationStmt] super(...)
# 58| 1: [BlockStmt] { ... }
# 59| 4: [Method] fn
# 59| 3: [TypeAccess] Unit
# 59| 5: [BlockStmt] { ... }
# 60| 0: [ExprStmt] <Expr>;
# 60| 0: [MethodAccess] println(...)
@@ -955,19 +1001,24 @@ reflection.kt:
# 75| 0: [SuperConstructorInvocationStmt] super(...)
# 75| 1: [BlockStmt] { ... }
# 76| 2: [Method] m1
# 76| 3: [TypeAccess] String
#-----| 4: (Parameters)
# 76| 0: [Parameter] i
# 76| 0: [TypeAccess] T1
# 76| 5: [BlockStmt] { ... }
# 76| 0: [ReturnStmt] return ...
# 76| 0: [MethodAccess] toString(...)
# 76| -1: [ThisAccess] this
# 78| 3: [Method] getP2
# 78| 3: [TypeAccess] T1
# 78| 5: [BlockStmt] { ... }
# 78| 0: [ReturnStmt] return ...
# 78| 0: [NullLiteral] null
# 79| 4: [Method] setP2
# 79| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 79| 0: [Parameter] value
# 79| 0: [TypeAccess] T1
# 79| 5: [BlockStmt] { ... }
# 79| 0: [ReturnStmt] return ...
# 79| 0: [VarAccess] INSTANCE
@@ -977,6 +1028,7 @@ reflection.kt:
# 83| 3: [Constructor] Class2
#-----| 4: (Parameters)
# 83| 0: [Parameter] value
# 83| 0: [TypeAccess] T
# 83| 5: [BlockStmt] { ... }
# 83| 0: [SuperConstructorInvocationStmt] super(...)
# 83| 1: [BlockStmt] { ... }
@@ -984,6 +1036,7 @@ reflection.kt:
# 83| 0: [KtInitializerAssignExpr] ...=...
# 83| 0: [VarAccess] value
# 83| 4: [Method] getValue
# 83| 3: [TypeAccess] T
# 83| 5: [BlockStmt] { ... }
# 83| 0: [ReturnStmt] return ...
# 83| 0: [VarAccess] this.value
@@ -997,10 +1050,12 @@ reflection.kt:
# 86| 1: [Constructor] Inner
#-----| 4: (Parameters)
# 86| 0: [Parameter] t
# 86| 0: [TypeAccess] T1
# 86| 5: [BlockStmt] { ... }
# 86| 0: [SuperConstructorInvocationStmt] super(...)
# 86| 1: [BlockStmt] { ... }
# 89| 8: [Method] test
# 89| 3: [TypeAccess] Unit
# 89| 5: [BlockStmt] { ... }
# 90| 0: [ExprStmt] <Expr>;
# 90| 0: [MethodAccess] fn11(...)
@@ -1045,6 +1100,7 @@ reflection.kt:
# 105| 1: [Constructor] Base1
#-----| 4: (Parameters)
# 105| 0: [Parameter] prop1
# 105| 0: [TypeAccess] int
# 105| 5: [BlockStmt] { ... }
# 105| 0: [SuperConstructorInvocationStmt] super(...)
# 105| 1: [BlockStmt] { ... }
@@ -1052,13 +1108,16 @@ reflection.kt:
# 105| 0: [KtInitializerAssignExpr] ...=...
# 105| 0: [VarAccess] prop1
# 105| 2: [Method] getProp1
# 105| 3: [TypeAccess] int
# 105| 5: [BlockStmt] { ... }
# 105| 0: [ReturnStmt] return ...
# 105| 0: [VarAccess] this.prop1
# 105| -1: [ThisAccess] this
# 105| 2: [Method] setProp1
# 105| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 105| 0: [Parameter] <set-?>
# 105| 0: [TypeAccess] int
# 105| 5: [BlockStmt] { ... }
# 105| 0: [ExprStmt] <Expr>;
# 105| 0: [AssignExpr] ...=...
@@ -1072,11 +1131,13 @@ reflection.kt:
# 107| 1: [Constructor] Derived1
#-----| 4: (Parameters)
# 107| 0: [Parameter] prop1
# 107| 0: [TypeAccess] int
# 107| 5: [BlockStmt] { ... }
# 107| 0: [SuperConstructorInvocationStmt] super(...)
# 107| 0: [VarAccess] prop1
# 107| 1: [BlockStmt] { ... }
# 108| 2: [Method] fn
# 108| 3: [TypeAccess] Unit
# 108| 5: [BlockStmt] { ... }
# 109| 0: [ExprStmt] <Expr>;
# 109| 0: [MethodAccess] println(...)
@@ -1124,6 +1185,7 @@ reflection.kt:
# 113| 0: [SuperConstructorInvocationStmt] super(...)
# 113| 1: [BlockStmt] { ... }
# 114| 2: [Method] fn
# 114| 3: [TypeAccess] Unit
# 114| 5: [BlockStmt] { ... }
# 115| 0: [LocalTypeDeclStmt] class ...
# 115| 0: [LocalClass]
@@ -1131,8 +1193,10 @@ reflection.kt:
# 115| 5: [BlockStmt] { ... }
# 115| 0: [SuperConstructorInvocationStmt] super(...)
# 115| 1: [Method] fn1
# 115| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 115| 0: [Parameter] i
# 115| 0: [TypeAccess] int
# 115| 5: [BlockStmt] { ... }
# 116| 1: [LocalVariableDeclStmt] var ...;
# 116| 1: [LocalVariableDeclExpr] x

View File

@@ -1,3 +1,6 @@
| stmts.kt:2:1:20:1 | int | TypeAccess |
| stmts.kt:2:20:2:25 | int | TypeAccess |
| stmts.kt:2:28:2:33 | int | TypeAccess |
| stmts.kt:3:5:6:5 | when ... | WhenExpr |
| stmts.kt:3:8:3:8 | x | VarAccess |
| stmts.kt:3:8:3:12 | ... > ... | GTExpr |
@@ -43,6 +46,9 @@
| stmts.kt:19:12:19:12 | x | VarAccess |
| stmts.kt:19:12:19:16 | ... + ... | AddExpr |
| stmts.kt:19:16:19:16 | y | VarAccess |
| stmts.kt:22:1:30:1 | Unit | TypeAccess |
| stmts.kt:22:11:22:16 | int | TypeAccess |
| stmts.kt:22:19:22:24 | int | TypeAccess |
| stmts.kt:23:18:23:18 | x | VarAccess |
| stmts.kt:23:18:23:24 | ... < ... | LTExpr |
| stmts.kt:23:22:23:24 | 100 | IntegerLiteral |
@@ -56,6 +62,7 @@
| stmts.kt:28:11:28:11 | x | VarAccess |
| stmts.kt:28:11:28:15 | ... > ... | GTExpr |
| stmts.kt:28:15:28:15 | y | VarAccess |
| stmts.kt:32:1:42:1 | int | TypeAccess |
| stmts.kt:34:15:34:30 | Exception | TypeAccess |
| stmts.kt:34:15:34:30 | new Exception(...) | ClassInstanceExpr |
| stmts.kt:34:26:34:28 | Foo | StringLiteral |

View File

@@ -1,7 +1,7 @@
varAcc
| variables.kt:3:5:3:21 | prop |
| variables.kt:3:5:3:21 | this.prop |
| variables.kt:10:1:10:21 | topLevel |
| variables.kt:10:1:10:21 | VariablesKt.topLevel |
| variables.kt:10:1:10:21 | topLevel |
| variables.kt:16:11:16:18 | o |
| variables.kt:16:11:16:18 | o |