Kotlin: Remove another not-null-expr

This commit is contained in:
Ian Lynagh
2022-08-24 11:07:10 +01:00
parent 940f18f5ae
commit 01f27ea331

View File

@@ -2117,7 +2117,12 @@ open class KotlinFileExtractor(
if (isBuiltinCallKotlin(c, "arrayOf")) {
if (c.typeArgumentsCount == 1) {
extractTypeAccessRecursive(c.getTypeArgument(0)!!, locId, id, -1, callable, enclosingStmt, TypeContext.GENERIC_ARGUMENT)
val typeArgument = c.getTypeArgument(0)
if (typeArgument == null) {
logger.errorElement("Type argument missing in an arrayOf call", c)
} else {
extractTypeAccessRecursive(typeArgument, locId, id, -1, callable, enclosingStmt, TypeContext.GENERIC_ARGUMENT)
}
} else {
logger.errorElement("Expected to find one type argument in arrayOf call", c )
}