Skip to content

Commit d7b06aa

Browse files
authored
Merge pull request github#9401 from tamasvajk/kotlin-cleanup
Kotlin: Reuse `codeQlWithHasQuestionMark`
2 parents 7214990 + 90fdd7e commit d7b06aa

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,7 +1328,7 @@ open class KotlinUsesExtractor(
13281328
if (t.isArray() || t.isNullableArray()) {
13291329
val elementType = t.getArrayElementType(pluginContext.irBuiltIns)
13301330
val erasedElementType = erase(elementType)
1331-
return withQuestionMark((classifier as IrClassSymbol).typeWith(erasedElementType), t.hasQuestionMark)
1331+
return (classifier as IrClassSymbol).typeWith(erasedElementType).codeQlWithHasQuestionMark(t.hasQuestionMark)
13321332
}
13331333

13341334
if (owner is IrClass) {
@@ -1452,6 +1452,4 @@ open class KotlinUsesExtractor(
14521452
return tw.getVariableLabelFor<DbLocalvar>(v)
14531453
}
14541454

1455-
fun withQuestionMark(t: IrType, hasQuestionMark: Boolean) = if(hasQuestionMark) t.makeNullable() else t.makeNotNull()
1456-
14571455
}

0 commit comments

Comments
 (0)