File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed
java/kotlin-extractor/src/main/kotlin/utils Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package com.github.codeql
3
3
import com.github.codeql.utils.getJvmName
4
4
import com.github.codeql.utils.versions.*
5
5
import com.intellij.openapi.vfs.StandardFileSystems
6
+ import org.jetbrains.kotlin.fir.java.JavaBinarySourceElement
6
7
import org.jetbrains.kotlin.load.java.sources.JavaSourceElement
7
8
import org.jetbrains.kotlin.load.java.structure.impl.classFiles.BinaryJavaClass
8
9
import org.jetbrains.kotlin.load.kotlin.VirtualFileKotlinClass
@@ -80,6 +81,9 @@ fun getIrClassVirtualFile(irClass: IrClass): VirtualFile? {
80
81
is BinaryJavaClass -> return element.virtualFile
81
82
}
82
83
}
84
+ is JavaBinarySourceElement -> {
85
+ return cSource.javaClass.virtualFile
86
+ }
83
87
is KotlinJvmBinarySourceElement -> {
84
88
val binaryClass = cSource.binaryClass
85
89
when (binaryClass) {
Original file line number Diff line number Diff line change
1
+ package org.jetbrains.kotlin.fir.java
2
+
3
+ import org.jetbrains.kotlin.descriptors.SourceElement
4
+ import org.jetbrains.kotlin.load.java.structure.impl.classFiles.BinaryJavaClass
5
+
6
+ /*
7
+ We need this class to exist, but the compiler will never give us an
8
+ instance of it.
9
+ */
10
+ abstract class JavaBinarySourceElement private constructor(val javaClass : BinaryJavaClass ): SourceElement {
11
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ The compiler provides this class, so we don't have to do anything.
3
+ */
You can’t perform that action at this time.
0 commit comments