mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Inline version-specific override code where there is now only one version
This commit is contained in:
@@ -8053,7 +8053,7 @@ open class KotlinFileExtractor(
|
|||||||
?.symbol
|
?.symbol
|
||||||
?.typeWithArguments(listOf(functionNTypeArguments.last()))
|
?.typeWithArguments(listOf(functionNTypeArguments.last()))
|
||||||
else
|
else
|
||||||
functionN(pluginContext)(functionNTypeArguments.size - 1)
|
pluginContext.irBuiltIns.functionN(functionNTypeArguments.size - 1)
|
||||||
.symbol
|
.symbol
|
||||||
.typeWithArguments(functionNTypeArguments)
|
.typeWithArguments(functionNTypeArguments)
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.github.codeql
|
|||||||
|
|
||||||
import com.github.codeql.utils.versions.copyParameterToFunction
|
import com.github.codeql.utils.versions.copyParameterToFunction
|
||||||
import com.github.codeql.utils.versions.createImplicitParameterDeclarationWithWrappedDescriptor
|
import com.github.codeql.utils.versions.createImplicitParameterDeclarationWithWrappedDescriptor
|
||||||
import com.github.codeql.utils.versions.getAnnotationType
|
|
||||||
import java.lang.annotation.ElementType
|
import java.lang.annotation.ElementType
|
||||||
import java.util.HashSet
|
import java.util.HashSet
|
||||||
import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext
|
import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext
|
||||||
@@ -375,7 +374,7 @@ class MetaAnnotationSupport(
|
|||||||
.apply {
|
.apply {
|
||||||
createImplicitParameterDeclarationWithWrappedDescriptor()
|
createImplicitParameterDeclarationWithWrappedDescriptor()
|
||||||
parent = annotationClass
|
parent = annotationClass
|
||||||
superTypes = listOf(getAnnotationType(pluginContext))
|
superTypes = listOf(pluginContext.irBuiltIns.annotationType)
|
||||||
}
|
}
|
||||||
|
|
||||||
val propertyName = Name.identifier("value")
|
val propertyName = Name.identifier("value")
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
package com.github.codeql.utils.versions
|
|
||||||
|
|
||||||
import org.jetbrains.kotlin.ir.IrFileEntry
|
|
||||||
|
|
||||||
typealias FileEntry = IrFileEntry
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
package com.github.codeql.utils.versions
|
|
||||||
|
|
||||||
import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext
|
|
||||||
|
|
||||||
fun functionN(pluginContext: IrPluginContext) = pluginContext.irBuiltIns::functionN
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
package com.github.codeql.utils.versions
|
|
||||||
|
|
||||||
import org.jetbrains.kotlin.ir.IrBuiltIns
|
|
||||||
|
|
||||||
typealias IrBuiltIns = org.jetbrains.kotlin.ir.IrBuiltIns
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
package com.github.codeql.utils.versions
|
|
||||||
|
|
||||||
import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext
|
|
||||||
|
|
||||||
fun getAnnotationType(context: IrPluginContext) = context.irBuiltIns.annotationType
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.github.codeql.utils.versions
|
package com.github.codeql.utils.versions
|
||||||
|
|
||||||
import org.jetbrains.kotlin.ir.types.*
|
import org.jetbrains.kotlin.ir.types.*
|
||||||
|
import org.jetbrains.kotlin.ir.IrBuiltIns
|
||||||
|
|
||||||
fun IrType.isNullableCodeQL(): Boolean =
|
fun IrType.isNullableCodeQL(): Boolean =
|
||||||
this.isNullable()
|
this.isNullable()
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.github.codeql.utils.versions
|
|||||||
|
|
||||||
import org.jetbrains.kotlin.ir.types.IrType
|
import org.jetbrains.kotlin.ir.types.IrType
|
||||||
import org.jetbrains.kotlin.ir.util.*
|
import org.jetbrains.kotlin.ir.util.*
|
||||||
|
import org.jetbrains.kotlin.ir.IrBuiltIns
|
||||||
|
|
||||||
fun IrType.isNullableCodeQL(): Boolean =
|
fun IrType.isNullableCodeQL(): Boolean =
|
||||||
this.isNullable()
|
this.isNullable()
|
||||||
|
|||||||
Reference in New Issue
Block a user