File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
kotlin-extractor/src/main/kotlin
ql/integration-tests/posix-only/kotlin/kotlin_kfunction Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1318,6 +1318,14 @@ open class KotlinFileExtractor(
1318
1318
val receiverClass = receiverType.classifier.owner as ? IrClass ? : return listOf ()
1319
1319
val ancestorTypes = ArrayList <IrSimpleType >()
1320
1320
1321
+ // KFunctionX doesn't implement FunctionX on versions before 1.7.0:
1322
+ if ((callTarget.name.asString() == " invoke" ) &&
1323
+ (receiverClass.fqNameWhenAvailable?.asString()?.startsWith(" kotlin.reflect.KFunction" ) == true ) &&
1324
+ (callTarget.parentClassOrNull?.fqNameWhenAvailable?.asString()?.startsWith(" kotlin.Function" ) == true )
1325
+ ) {
1326
+ return receiverType.arguments
1327
+ }
1328
+
1321
1329
// Populate ancestorTypes with the path from receiverType's class to its ancestor, callTarget's declaring type.
1322
1330
fun walkFrom (c : IrClass ): Boolean {
1323
1331
if (declaringType == c)
Original file line number Diff line number Diff line change 1
- | app/src/main/kotlin/testProject/App.kt:0:0:0:0 | Failed to find a class declaring invoke starting at KFunction2 |
You can’t perform that action at this time.
0 commit comments