AA: add tests for resolution to built-ins

This commit is contained in:
Jinseong Jeon
2022-09-15 12:29:52 -07:00
committed by Ilya Kirillov
parent c7347cfb48
commit e50da634bc
11 changed files with 47 additions and 10 deletions
@@ -0,0 +1,4 @@
fun foo() {
val li = ArrayList<String>().listIterator()
li.<caret>add("test")
}
@@ -0,0 +1,2 @@
Resolved to:
public abstract fun add(element: T): kotlin.Unit
@@ -0,0 +1,3 @@
fun box(map: MutableMap<String, String>) {
map.get<caret>OrDefault("key", "value")
}
@@ -0,0 +1,2 @@
Resolved to:
@kotlin.SinceKotlin @kotlin.internal.PlatformDependent public open fun getOrDefault(key: K, defaultValue: V): V { /* compiled code */ }
@@ -0,0 +1,5 @@
// WITH_STDLIB
fun box(map: MutableMap<String, String>) {
map.get<caret>OrDefault("key", null)
}
@@ -0,0 +1,2 @@
Resolved to:
PsiMethod:getOrDefault($this$getOrDefault: PsiType:Map<? extends K, ? extends V>, key: PsiType:K, defaultValue: PsiType:V): PsiType:V
@@ -1 +1,2 @@
Resolved to:
internal const val MinId = -1
@@ -1 +1,2 @@
Resolved to:
annotation class MyAnno