@@ -1568,7 +1568,7 @@ open class KotlinFileExtractor(
15681568 }
15691569 }
15701570
1571- private fun findFunction (cls : IrClass , name : String ): IrFunction ? = cls.declarations.findSubType<IrDeclaration , IrFunction > { it.name.asString() == name }
1571+ private fun findFunction (cls : IrClass , name : String ): IrFunction ? = cls.declarations.findSubType<IrFunction > { it.name.asString() == name }
15721572
15731573 val jvmIntrinsicsClass by lazy {
15741574 val result = pluginContext.referenceClass(FqName (" kotlin.jvm.internal.Intrinsics" ))?.owner
@@ -1625,7 +1625,7 @@ open class KotlinFileExtractor(
16251625 }
16261626
16271627 val stringValueOfObjectMethod by lazy {
1628- val result = javaLangString?.declarations?.findSubType<IrDeclaration , IrFunction > {
1628+ val result = javaLangString?.declarations?.findSubType<IrFunction > {
16291629 it.name.asString() == " valueOf" &&
16301630 it.valueParameters.size == 1 &&
16311631 it.valueParameters[0 ].type == pluginContext.irBuiltIns.anyNType
@@ -1637,7 +1637,7 @@ open class KotlinFileExtractor(
16371637 }
16381638
16391639 val objectCloneMethod by lazy {
1640- val result = javaLangObject?.declarations?.findSubType<IrDeclaration , IrFunction > {
1640+ val result = javaLangObject?.declarations?.findSubType<IrFunction > {
16411641 it.name.asString() == " clone"
16421642 }
16431643 if (result == null ) {
@@ -1653,7 +1653,7 @@ open class KotlinFileExtractor(
16531653 }
16541654
16551655 val kotlinNoWhenBranchMatchedConstructor by lazy {
1656- val result = kotlinNoWhenBranchMatchedExn?.declarations?.findSubType<IrDeclaration , IrConstructor > {
1656+ val result = kotlinNoWhenBranchMatchedExn?.declarations?.findSubType<IrConstructor > {
16571657 it.valueParameters.isEmpty()
16581658 }
16591659 if (result == null ) {
@@ -1775,7 +1775,7 @@ open class KotlinFileExtractor(
17751775 return
17761776 }
17771777
1778- val func = ((c.getTypeArgument(0 ) as ? IrSimpleType )?.classifier?.owner as ? IrClass )?.declarations?.findSubType<IrDeclaration , IrFunction > { it.name.asString() == fnName }
1778+ val func = ((c.getTypeArgument(0 ) as ? IrSimpleType )?.classifier?.owner as ? IrClass )?.declarations?.findSubType<IrFunction > { it.name.asString() == fnName }
17791779 if (func == null ) {
17801780 logger.errorElement(" Couldn't find function $fnName on enum type" , c)
17811781 return
@@ -2225,7 +2225,7 @@ open class KotlinFileExtractor(
22252225 logger.errorElement(" Argument to dataClassArrayMemberToString not a class" , c)
22262226 return
22272227 }
2228- val realCallee = javaUtilArrays?.declarations?.findSubType<IrDeclaration , IrFunction > { decl ->
2228+ val realCallee = javaUtilArrays?.declarations?.findSubType<IrFunction > { decl ->
22292229 decl.name.asString() == " toString" && decl.valueParameters.size == 1 &&
22302230 decl.valueParameters[0 ].type.classOrNull?.let { it == realArrayClass } == true
22312231 }
@@ -2252,7 +2252,7 @@ open class KotlinFileExtractor(
22522252 logger.errorElement(" Argument to dataClassArrayMemberHashCode not a class" , c)
22532253 return
22542254 }
2255- val realCallee = javaUtilArrays?.declarations?.findSubType<IrDeclaration , IrFunction > { decl ->
2255+ val realCallee = javaUtilArrays?.declarations?.findSubType<IrFunction > { decl ->
22562256 decl.name.asString() == " hashCode" && decl.valueParameters.size == 1 &&
22572257 decl.valueParameters[0 ].type.classOrNull?.let { it == realArrayClass } == true
22582258 }
@@ -4363,7 +4363,7 @@ open class KotlinFileExtractor(
43634363 return
43644364 }
43654365
4366- val invokeMethod = functionType.classOrNull?.owner?.declarations?.findSubType<IrDeclaration , IrFunction > { it.name.asString() == OperatorNameConventions .INVOKE .asString()}
4366+ val invokeMethod = functionType.classOrNull?.owner?.declarations?.findSubType<IrFunction > { it.name.asString() == OperatorNameConventions .INVOKE .asString()}
43674367 if (invokeMethod == null ) {
43684368 logger.errorElement(" Couldn't find `invoke` method on functional interface." , e)
43694369 return
@@ -4374,7 +4374,7 @@ open class KotlinFileExtractor(
43744374 logger.errorElement(" Expected to find SAM conversion to IrClass. Found '${typeOwner.javaClass} ' instead. Can't implement SAM interface." , e)
43754375 return
43764376 }
4377- val samMember = typeOwner.declarations.findSubType<IrDeclaration , IrFunction > { it is IrOverridableMember && it.modality == Modality .ABSTRACT }
4377+ val samMember = typeOwner.declarations.findSubType<IrFunction > { it is IrOverridableMember && it.modality == Modality .ABSTRACT }
43784378 if (samMember == null ) {
43794379 logger.errorElement(" Couldn't find SAM member in type '${typeOwner.kotlinFqName.asString()} '. Can't implement SAM interface." , e)
43804380 return
@@ -4563,7 +4563,7 @@ open class KotlinFileExtractor(
45634563 val superCallId = tw.getFreshIdLabel<DbSuperconstructorinvocationstmt >()
45644564 tw.writeStmts_superconstructorinvocationstmt(superCallId, constructorBlockId, 0 , ids.constructor )
45654565
4566- val baseConstructor = baseClass.owner.declarations.findSubType<IrDeclaration , IrFunction > { it.symbol is IrConstructorSymbol }
4566+ val baseConstructor = baseClass.owner.declarations.findSubType<IrFunction > { it.symbol is IrConstructorSymbol }
45674567 val baseConstructorId = useFunction<DbConstructor >(baseConstructor as IrFunction )
45684568
45694569 tw.writeHasLocation(superCallId, locId)
0 commit comments