File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
kotlin-extractor/src/main/kotlin
ql/test/kotlin/library-tests/java-map-methods Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1277,10 +1277,7 @@ open class KotlinUsesExtractor(
12771277 javaClass.declarations.findSubType<IrFunction > { decl ->
12781278 decl.name.asString() == jvmName &&
12791279 decl.valueParameters.size == f.valueParameters.size &&
1280- // Note matching by classifier not the whole type so that generic arguments are allowed to differ,
1281- // as they always will for method type parameters occurring in parameter types (e.g. <T> toArray(T[] array)
1282- // Differing only by nullability would also be insignificant if it came up.
1283- decl.valueParameters.zip(f.valueParameters).all { p -> p.first.type.classifierOrNull == p.second.type.classifierOrNull }
1280+ decl.valueParameters.zip(f.valueParameters).all { p -> erase(p.first.type) == erase(p.second.type) }
12841281 } ? :
12851282 // Or if there is none, look for the only viable overload
12861283 javaClass.declarations.singleOrNullSubType<IrFunction > { decl ->
Original file line number Diff line number Diff line change 11fun test (m : Map <Int , Int >) = m.getOrDefault(1 , 2 )
22
33fun test2 (s : String ) = s.length
4+
5+ fun remove (l : MutableList <Int >) {
6+ l.remove(5 )
7+ }
You can’t perform that action at this time.
0 commit comments