mirror of
https://github.com/github/codeql.git
synced 2025-12-22 11:46:32 +01:00
Merge pull request #10113 from igfoo/igfoo/nullexpr
Kotlin: Remove another instance of a not-null-expression
This commit is contained in:
@@ -4150,7 +4150,12 @@ open class KotlinFileExtractor(
|
||||
startIndex: Int = 0,
|
||||
reverse: Boolean = false
|
||||
) {
|
||||
extractTypeArguments((0 until c.typeArgumentsCount).map { c.getTypeArgument(it)!! }, tw.getLocation(c), parentExpr, enclosingCallable, enclosingStmt, startIndex, reverse)
|
||||
val typeArguments = (0 until c.typeArgumentsCount).map { c.getTypeArgument(it) }.requireNoNullsOrNull()
|
||||
if (typeArguments == null) {
|
||||
logger.errorElement("Found a null type argument for a member access expression", c)
|
||||
} else {
|
||||
extractTypeArguments(typeArguments, tw.getLocation(c), parentExpr, enclosingCallable, enclosingStmt, startIndex, reverse)
|
||||
}
|
||||
}
|
||||
|
||||
private fun extractArrayCreationWithInitializer(
|
||||
|
||||
Reference in New Issue
Block a user