@@ -1957,6 +1957,18 @@ open class KotlinFileExtractor(
1957
1957
}
1958
1958
}
1959
1959
1960
+ private fun getCalleeRealOverrideTarget (f : IrFunction ): IrFunction {
1961
+ val target = f.target.realOverrideTarget
1962
+ return if (overridesCollectionsMethodWithAlteredParameterTypes(f))
1963
+ // Cope with the case where an inherited callee can be rewritten with substituted parameter types
1964
+ // if the child class uses it to implement a collections interface
1965
+ // (for example, `class A { boolean contains(Object o) { ... } }; class B<T> extends A implements Set<T> { ... }`
1966
+ // leads to generating a function `A.contains(B::T)`, with `initialSignatureFunction` pointing to `A.contains(Object)`.
1967
+ (target as ? IrLazyFunction )?.initialSignatureFunction ? : target
1968
+ else
1969
+ target
1970
+ }
1971
+
1960
1972
fun extractRawMethodAccess (
1961
1973
syntacticCallTarget : IrFunction ,
1962
1974
locElement : IrElement ,
@@ -2012,18 +2024,6 @@ open class KotlinFileExtractor(
2012
2024
}
2013
2025
}
2014
2026
2015
- private fun getCalleeRealOverrideTarget (f : IrFunction ): IrFunction {
2016
- val target = f.target.realOverrideTarget
2017
- return if (overridesCollectionsMethodWithAlteredParameterTypes(f))
2018
- // Cope with the case where an inherited callee can be rewritten with substituted parameter types
2019
- // if the child class uses it to implement a collections interface
2020
- // (for example, `class A { boolean contains(Object o) { ... } }; class B<T> extends A implements Set<T> { ... }`
2021
- // leads to generating a function `A.contains(B::T)`, with `initialSignatureFunction` pointing to `A.contains(Object)`.
2022
- (target as ? IrLazyFunction )?.initialSignatureFunction ? : target
2023
- else
2024
- target
2025
- }
2026
-
2027
2027
fun extractRawMethodAccess (
2028
2028
syntacticCallTarget : IrFunction ,
2029
2029
locId : Label <DbLocation >,
0 commit comments