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(
1277
1277
javaClass.declarations.findSubType<IrFunction > { decl ->
1278
1278
decl.name.asString() == jvmName &&
1279
1279
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) }
1284
1281
} ? :
1285
1282
// Or if there is none, look for the only viable overload
1286
1283
javaClass.declarations.singleOrNullSubType<IrFunction > { decl ->
Original file line number Diff line number Diff line change 1
1
fun test (m : Map <Int , Int >) = m.getOrDefault(1 , 2 )
2
2
3
3
fun 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