mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
Extract static method qualifier type accesses
This commit is contained in:
committed by
Ian Lynagh
parent
ef9a213ae1
commit
2730d07b4c
@@ -864,6 +864,8 @@ open class KotlinFileExtractor(
|
||||
|
||||
if (dr != null) {
|
||||
extractExpressionExpr(dr, callable, id, -1, enclosingStmt)
|
||||
} else if(callTarget.isStaticMethodOfClass) {
|
||||
extractTypeAccess(callTarget.parentAsClass.toRawType(), callable, id, -1, c, enclosingStmt)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -172,4 +172,12 @@ fun IrType.toRawType(): IrType =
|
||||
else -> this
|
||||
}
|
||||
|
||||
fun IrClass.toRawType(): IrType {
|
||||
val result = this.typeWith(listOf())
|
||||
return if (this.typeParameters.isNotEmpty())
|
||||
result.addAnnotations(listOf(RawTypeAnnotation.annotationConstructor))
|
||||
else
|
||||
result
|
||||
}
|
||||
|
||||
typealias TypeSubstitution = (IrType, KotlinUsesExtractor.TypeContext, IrPluginContext) -> IrType
|
||||
Reference in New Issue
Block a user