@@ -121,14 +121,19 @@ open class KotlinUsesExtractor(
121121 }
122122 }
123123
124- private fun extractErrorType (): TypeResults {
124+ private fun extractJavaErrorType (): TypeResult < DbErrortype > {
125125 val typeId = tw.getLabelFor<DbErrortype >(" @\" errorType\" " ) {
126126 tw.writeError_type(it)
127127 }
128+ return TypeResult (typeId, null , " <CodeQL error type>" )
129+ }
130+
131+ private fun extractErrorType (): TypeResults {
132+ val javaResult = extractJavaErrorType()
128133 val kotlinTypeId = tw.getLabelFor<DbKt_nullable_type >(" @\" errorKotlinType\" " ) {
129- tw.writeKt_nullable_types(it, typeId )
134+ tw.writeKt_nullable_types(it, javaResult.id )
130135 }
131- return TypeResults (TypeResult (typeId, null , " <CodeQL error type> " ) ,
136+ return TypeResults (javaResult ,
132137 TypeResult (kotlinTypeId, null , " <CodeQL error type>" ))
133138 }
134139
@@ -719,7 +724,7 @@ open class KotlinUsesExtractor(
719724 }
720725 else -> {
721726 logger.error(" Unrecognised IrSimpleType: " + s.javaClass + " : " + s.render())
722- return TypeResults ( TypeResult (fakeLabel(), " unknown " , " unknown " ), TypeResult (fakeLabel(), " unknown " , " unknown " ) )
727+ return extractErrorType( )
723728 }
724729 }
725730 }
@@ -1276,7 +1281,7 @@ open class KotlinUsesExtractor(
12761281 }
12771282 else -> {
12781283 logger.error(" Unexpected type argument." )
1279- return TypeResult (fakeLabel(), " unknown " , " unknown " )
1284+ return extractJavaErrorType( )
12801285 }
12811286 }
12821287 }
0 commit comments