Kotlin: Change return type of Android specific ConcurrentHashMap.keySet

This commit is contained in:
Tamas Vajk
2022-05-30 22:13:27 +02:00
parent bb93179c45
commit 89ffefd45e
5 changed files with 63 additions and 4 deletions

View File

@@ -0,0 +1,4 @@
| test.kt:4:5:6:5 | keySet | 0 | java.util.concurrent.ConcurrentHashMap$KeySetView<K,V> |
| test.kt:8:5:10:5 | keySet | 1 | java.util.concurrent.ConcurrentHashMap$KeySetView<K,V> |
| test.kt:17:5:19:5 | keySet | 0 | java.util.Set<K> |
| test.kt:21:5:23:5 | keySet | 1 | java.util.concurrent.OtherConcurrentHashMap$KeySetView<K,V> |

View File

@@ -0,0 +1,5 @@
import java
from Method m
where m.fromSource()
select m, m.getNumberOfParameters(), m.getReturnType().(RefType).getQualifiedName()

View File

@@ -0,0 +1,27 @@
package java.util.concurrent
class ConcurrentHashMap<K,V> {
fun keySet(): MutableSet<K> {
return null!!
}
fun keySet(p: V): KeySetView<K,V>? {
return null
}
class KeySetView<K,V> {
}
}
class OtherConcurrentHashMap<K,V> {
fun keySet(): MutableSet<K> {
return null!!
}
fun keySet(p: V): KeySetView<K,V>? {
return null
}
class KeySetView<K,V> {
}
}