diff --git a/java/kotlin-extractor2/src/main/kotlin/KotlinUsesExtractor.kt b/java/kotlin-extractor2/src/main/kotlin/KotlinUsesExtractor.kt index 9bf98efa5c7..b47836eff8c 100644 --- a/java/kotlin-extractor2/src/main/kotlin/KotlinUsesExtractor.kt +++ b/java/kotlin-extractor2/src/main/kotlin/KotlinUsesExtractor.kt @@ -2,6 +2,7 @@ package com.github.codeql import com.intellij.psi.PsiElement import org.jetbrains.kotlin.analysis.api.KaSession +import org.jetbrains.kotlin.analysis.api.types.KaType import org.jetbrains.kotlin.psi.* /* @@ -132,8 +133,12 @@ OLD: KE1 val typeResult: TypeResult, val javaClass: IrClass ) +*/ - fun useType(t: IrType, context: TypeContext = TypeContext.OTHER): TypeResults { + fun useType(t: KaType, context: TypeContext = TypeContext.OTHER): TypeResults { + TODO() +/* +OLD: KE1 when (t) { is IrSimpleType -> return useSimpleType(t, context) else -> { @@ -141,8 +146,11 @@ OLD: KE1 return extractErrorType() } } +*/ } +/* +OLD: KE1 private fun extractJavaErrorType(): TypeResult { val typeId = tw.getLabelFor("@\"errorType\"") { tw.writeError_type(it) } return TypeResult(typeId, "", "") @@ -833,6 +841,7 @@ OLD: KE1 return ArrayInfo(recInfo.elementTypeResults, typeResults, dimensions) } +*/ enum class TypeContext { RETURN, @@ -840,6 +849,8 @@ OLD: KE1 OTHER } +/* +OLD: KE1 private fun useSimpleType(s: IrSimpleType, context: TypeContext): TypeResults { if (s.abbreviation != null) { // TODO: Extract this information diff --git a/java/kotlin-extractor2/src/main/kotlin/utils/TypeResults.kt b/java/kotlin-extractor2/src/main/kotlin/utils/TypeResults.kt index d81e1e04b20..ac82b9bc641 100644 --- a/java/kotlin-extractor2/src/main/kotlin/utils/TypeResults.kt +++ b/java/kotlin-extractor2/src/main/kotlin/utils/TypeResults.kt @@ -14,14 +14,21 @@ OLD: KE1 * arguments ("InnerClass" or "OuterClass" or "OtherClass") or * an array ("componentShortName[]"). */ +*/ data class TypeResultGeneric( val id: Label, +/* +OLD: KE1 val signature: SignatureType?, val shortName: String +*/ ) { +/* +OLD: KE1 fun cast(): TypeResultGeneric { @Suppress("UNCHECKED_CAST") return this as TypeResultGeneric } +*/ } data class TypeResultsGeneric( @@ -29,12 +36,17 @@ data class TypeResultsGeneric( val kotlinResult: TypeResultGeneric ) +/* +OLD: KE1 typealias TypeResult = TypeResultGeneric typealias TypeResultWithoutSignature = TypeResultGeneric +*/ typealias TypeResults = TypeResultsGeneric +/* +OLD: KE1 typealias TypeResultsWithoutSignatures = TypeResultsGeneric fun TypeResult.forgetSignature(): TypeResultWithoutSignature {