Merge pull request #9379 from tamasvajk/kotlin-android-specific-return-types

Kotlin: Change return type of Android specific `ConcurrentHashMap.keySet`
This commit is contained in:
Tamás Vajk
2022-05-31 14:00:36 +02:00
committed by GitHub
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> {
}
}