mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +01:00
Convert type-parameter-out-of-scope warning into consistency query
The warning in the extractor is inaccurate due to references to enclosing types' type parameters. A consistency query can check that the type parameter is indeed in scope exploiting broader knowledge of the enclosing types.
This commit is contained in:
committed by
Ian Lynagh
parent
36356c2937
commit
7fe260c1a2
@@ -863,11 +863,7 @@ open class KotlinUsesExtractor(
|
||||
|
||||
fun useTypeParameter(param: IrTypeParameter) =
|
||||
TypeResult(
|
||||
tw.getLabelFor<DbTypevariable>(getTypeParameterLabel(param)) {
|
||||
// Any type parameter that is in scope should have been extracted already
|
||||
// in extractClassSource or extractFunction
|
||||
logger.error("Missing type parameter label")
|
||||
},
|
||||
tw.getLabelFor<DbTypevariable>(getTypeParameterLabel(param)),
|
||||
useType(eraseTypeParameter(param)).javaResult.signature,
|
||||
param.name.asString()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user