@@ -650,7 +650,7 @@ open class KotlinUsesExtractor(
650
650
otherIsPrimitive : Boolean ,
651
651
javaClass : IrClass ,
652
652
kotlinPackageName : String , kotlinClassName : String ): TypeResults {
653
- val javaResult = if ((context == TypeContext .RETURN || (context == TypeContext .OTHER && otherIsPrimitive)) && ! s.hasQuestionMark && primitiveName != null ) {
653
+ val javaResult = if ((context == TypeContext .RETURN || (context == TypeContext .OTHER && otherIsPrimitive)) && ! s.isNullable() && primitiveName != null ) {
654
654
val label: Label <DbPrimitive > = tw.getLabelFor(" @\" type;$primitiveName \" " , {
655
655
tw.writePrimitives(it, primitiveName)
656
656
})
@@ -660,7 +660,7 @@ open class KotlinUsesExtractor(
660
660
}
661
661
val kotlinClassId = useClassInstance(kotlinClass, listOf ()).typeResult.id
662
662
val kotlinResult = if (true ) TypeResult (fakeKotlinType(), " TODO" , " TODO" ) else
663
- if (s.hasQuestionMark ) {
663
+ if (s.isNullable() ) {
664
664
val kotlinSignature = " $kotlinPackageName .$kotlinClassName ?" // TODO: Is this right?
665
665
val kotlinLabel = " @\" kt_type;nullable;$kotlinPackageName .$kotlinClassName \" "
666
666
val kotlinId: Label <DbKt_nullable_type > = tw.getLabelFor(kotlinLabel, {
@@ -704,13 +704,13 @@ open class KotlinUsesExtractor(
704
704
owner is IrClass -> {
705
705
val args = if (s.isRawType()) null else s.arguments
706
706
707
- return useSimpleTypeClass(owner, args, s.hasQuestionMark )
707
+ return useSimpleTypeClass(owner, args, s.isNullable() )
708
708
}
709
709
owner is IrTypeParameter -> {
710
710
val javaResult = useTypeParameter(owner)
711
711
val aClassId = makeClass(" kotlin" , " TypeParam" ) // TODO: Wrong
712
712
val kotlinResult = if (true ) TypeResult (fakeKotlinType(), " TODO" , " TODO" ) else
713
- if (s.hasQuestionMark ) {
713
+ if (s.isNullable() ) {
714
714
val kotlinSignature = " ${javaResult.signature} ?" // TODO: Wrong
715
715
val kotlinLabel = " @\" kt_type;nullable;type_param\" " // TODO: Wrong
716
716
val kotlinId: Label <DbKt_nullable_type > = tw.getLabelFor(kotlinLabel, {
@@ -1485,7 +1485,7 @@ open class KotlinUsesExtractor(
1485
1485
if (t.isArray() || t.isNullableArray()) {
1486
1486
val elementType = t.getArrayElementType(pluginContext.irBuiltIns)
1487
1487
val erasedElementType = erase(elementType)
1488
- return owner.typeWith(erasedElementType).codeQlWithHasQuestionMark(t.hasQuestionMark )
1488
+ return owner.typeWith(erasedElementType).codeQlWithHasQuestionMark(t.isNullable() )
1489
1489
}
1490
1490
1491
1491
return if (t.arguments.isNotEmpty())
0 commit comments