@@ -650,7 +650,7 @@ open class KotlinUsesExtractor(
650650 otherIsPrimitive : Boolean ,
651651 javaClass : IrClass ,
652652 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 ) {
654654 val label: Label <DbPrimitive > = tw.getLabelFor(" @\" type;$primitiveName \" " , {
655655 tw.writePrimitives(it, primitiveName)
656656 })
@@ -660,7 +660,7 @@ open class KotlinUsesExtractor(
660660 }
661661 val kotlinClassId = useClassInstance(kotlinClass, listOf ()).typeResult.id
662662 val kotlinResult = if (true ) TypeResult (fakeKotlinType(), " TODO" , " TODO" ) else
663- if (s.hasQuestionMark ) {
663+ if (s.isNullable() ) {
664664 val kotlinSignature = " $kotlinPackageName .$kotlinClassName ?" // TODO: Is this right?
665665 val kotlinLabel = " @\" kt_type;nullable;$kotlinPackageName .$kotlinClassName \" "
666666 val kotlinId: Label <DbKt_nullable_type > = tw.getLabelFor(kotlinLabel, {
@@ -704,13 +704,13 @@ open class KotlinUsesExtractor(
704704 owner is IrClass -> {
705705 val args = if (s.isRawType()) null else s.arguments
706706
707- return useSimpleTypeClass(owner, args, s.hasQuestionMark )
707+ return useSimpleTypeClass(owner, args, s.isNullable() )
708708 }
709709 owner is IrTypeParameter -> {
710710 val javaResult = useTypeParameter(owner)
711711 val aClassId = makeClass(" kotlin" , " TypeParam" ) // TODO: Wrong
712712 val kotlinResult = if (true ) TypeResult (fakeKotlinType(), " TODO" , " TODO" ) else
713- if (s.hasQuestionMark ) {
713+ if (s.isNullable() ) {
714714 val kotlinSignature = " ${javaResult.signature} ?" // TODO: Wrong
715715 val kotlinLabel = " @\" kt_type;nullable;type_param\" " // TODO: Wrong
716716 val kotlinId: Label <DbKt_nullable_type > = tw.getLabelFor(kotlinLabel, {
@@ -1485,7 +1485,7 @@ open class KotlinUsesExtractor(
14851485 if (t.isArray() || t.isNullableArray()) {
14861486 val elementType = t.getArrayElementType(pluginContext.irBuiltIns)
14871487 val erasedElementType = erase(elementType)
1488- return owner.typeWith(erasedElementType).codeQlWithHasQuestionMark(t.hasQuestionMark )
1488+ return owner.typeWith(erasedElementType).codeQlWithHasQuestionMark(t.isNullable() )
14891489 }
14901490
14911491 return if (t.arguments.isNotEmpty())
0 commit comments