Commit 25df3bf4 authored by Jinseong Jeon's avatar Jinseong Jeon
Browse files

FIR UAST: handle resolution to deserialized top-level functions

parent ed6d88ab
Showing with 123 additions and 65 deletions
+123 -65
......@@ -621,6 +621,55 @@ interface UastResolveApiFixtureTestBase : UastPluginSelection {
TestCase.assertEquals("ListIterator", resolved.containingClass?.name)
}
fun checkStringJVM(myFixture: JavaCodeInsightTestFixture) {
myFixture.configureByText(
"main.kt", """
fun foo() {
"with default".capitalize()
"without default".capitalize(Locale.US)
"with default".toUpperCase()
"without default".toUpperCase(Locale.US)
}
""".trimIndent()
)
val uFile = myFixture.file.toUElement()!!
val withDefaultCapitalize = uFile.findElementByTextFromPsi<UCallExpression>("capitalize()", strict = false)
.orFail("cant convert to UCallExpression")
val withDefaultCapitalizeResolved = withDefaultCapitalize.resolve()
.orFail("cant resolve from $withDefaultCapitalize")
TestCase.assertEquals("capitalize", withDefaultCapitalizeResolved.name)
TestCase.assertEquals(1, withDefaultCapitalizeResolved.parameterList.parametersCount)
TestCase.assertEquals("PsiType:String", withDefaultCapitalizeResolved.parameterList.parameters[0].type.toString())
val withoutDefaultCapitalize = uFile.findElementByTextFromPsi<UCallExpression>("capitalize(Locale.US)", strict = false)
.orFail("cant convert to UCallExpression")
val withoutDefaultCapitalizeResolved = withoutDefaultCapitalize.resolve()
.orFail("cant resolve from $withoutDefaultCapitalize")
TestCase.assertEquals("capitalize", withoutDefaultCapitalizeResolved.name)
TestCase.assertEquals(2, withoutDefaultCapitalizeResolved.parameterList.parametersCount)
TestCase.assertEquals("PsiType:String", withoutDefaultCapitalizeResolved.parameterList.parameters[0].type.toString())
TestCase.assertEquals("PsiType:Locale", withoutDefaultCapitalizeResolved.parameterList.parameters[1].type.toString())
val withDefaultUpperCase = uFile.findElementByTextFromPsi<UCallExpression>("toUpperCase()", strict = false)
.orFail("cant convert to UCallExpression")
val withDefaultUpperCaseResolved = withDefaultUpperCase.resolve()
.orFail("cant resolve from $withDefaultUpperCase")
TestCase.assertEquals("toUpperCase", withDefaultUpperCaseResolved.name)
TestCase.assertEquals(1, withDefaultUpperCaseResolved.parameterList.parametersCount)
TestCase.assertEquals("PsiType:String", withDefaultUpperCaseResolved.parameterList.parameters[0].type.toString())
val withoutDefaultUpperCase = uFile.findElementByTextFromPsi<UCallExpression>("toUpperCase(Locale.US)", strict = false)
.orFail("cant convert to UCallExpression")
val withoutDefaultUpperCaseResolved = withoutDefaultUpperCase.resolve()
.orFail("cant resolve from $withoutDefaultUpperCase")
TestCase.assertEquals("toUpperCase", withoutDefaultUpperCaseResolved.name)
TestCase.assertEquals(2, withoutDefaultUpperCaseResolved.parameterList.parametersCount)
TestCase.assertEquals("PsiType:String", withoutDefaultUpperCaseResolved.parameterList.parameters[0].type.toString())
TestCase.assertEquals("PsiType:Locale", withoutDefaultUpperCaseResolved.parameterList.parameters[1].type.toString())
}
fun checkArgumentMappingDefaultValue(myFixture: JavaCodeInsightTestFixture) {
myFixture.configureByText(
"main.kt", """
......
......@@ -19,12 +19,14 @@ import org.jetbrains.kotlin.analysis.api.types.KtTypeMappingMode
import org.jetbrains.kotlin.analysis.project.structure.KtSourceModule
import org.jetbrains.kotlin.analysis.project.structure.getKtModule
import org.jetbrains.kotlin.analysis.providers.DecompiledPsiDeclarationProvider.findPsi
import org.jetbrains.kotlin.asJava.findFacadeClass
import org.jetbrains.kotlin.asJava.getRepresentativeLightMethod
import org.jetbrains.kotlin.asJava.toLightClass
import org.jetbrains.kotlin.idea.KotlinLanguage
import org.jetbrains.kotlin.name.StandardClassIds
import org.jetbrains.kotlin.psi.*
import org.jetbrains.kotlin.psi.psiUtil.containingClass
import org.jetbrains.kotlin.psi.psiUtil.containingClassOrObject
import org.jetbrains.kotlin.types.typeUtil.TypeNullability
import org.jetbrains.uast.*
import org.jetbrains.uast.kotlin.*
......@@ -97,7 +99,7 @@ internal fun KtAnalysisSession.toPsiMethod(
} else {
psi.getRepresentativeLightMethod()
?: handleLocalOrSynthetic(psi)
?: run {
?: // Deserialized member function
psi.containingClass()?.getClassId()?.let { classId ->
toPsiClass(
buildClassType(classId),
......@@ -109,7 +111,10 @@ internal fun KtAnalysisSession.toPsiMethod(
UastFakeDeserializedLightMethod(psi, it)
}
}
}
?: // Deserialized top-level function
psi.containingKtFile.findFacadeClass()?.let {
UastFakeDeserializedLightMethod(psi, it)
}
}
}
else -> psi.getRepresentativeLightMethod()
......
......@@ -149,6 +149,10 @@ class FirUastResolveApiFixtureTest : KotlinLightCodeInsightFixtureTestCase(), Ua
doCheck("ListIterator", ::checkListIterator)
}
fun testStringJVM() {
doCheck("StringJVM", ::checkStringJVM)
}
fun testDivByZero() {
doCheck("DivByZero", ::checkDivByZero)
}
......
......@@ -17,13 +17,13 @@ UTypeReferenceExpression (name = kotlin.Suppress) -> USimpleNameReferenceExpress
UExpressionList (elvis) -> USimpleNameReferenceExpression (identifier = ?:) -> null: null
UIfExpression -> USimpleNameReferenceExpression (identifier = b) -> Kotlin_Light_Variable: b
UTypeReferenceExpression (name = java.lang.String) -> USimpleNameReferenceExpression (identifier = String) -> Decompiled_Class: String
USwitchClauseExpressionWithBody -> UQualifiedReferenceExpression -> null: null
USwitchClauseExpressionWithBody -> UQualifiedReferenceExpression -> null: null
USwitchClauseExpressionWithBody -> UQualifiedReferenceExpression -> Decompiled_Method: isBlank
USwitchClauseExpressionWithBody -> UQualifiedReferenceExpression -> Decompiled_Method: isBlank
UTypeReferenceExpression (name = kotlin.Suppress) -> USimpleNameReferenceExpression (identifier = Suppress) -> Decompiled_Class: Suppress
USwitchClauseExpressionWithBody -> UQualifiedReferenceExpression -> null: null
USwitchClauseExpressionWithBody -> UQualifiedReferenceExpression -> Decompiled_Method: isBlank
UQualifiedReferenceExpression -> USimpleNameReferenceExpression (identifier = str) -> Kotlin_Light_Value_Parameter: str
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to null) -> USimpleNameReferenceExpression (identifier = isBlank) -> FUN: isBlank
UBinaryExpression (operator = !=) -> UQualifiedReferenceExpression -> null: null
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = isBlank) -> FUN: isBlank
UBinaryExpression (operator = !=) -> UQualifiedReferenceExpression -> Decompiled_Method: isNotEmpty
UQualifiedReferenceExpression -> USimpleNameReferenceExpression (identifier = str) -> Kotlin_Light_Value_Parameter: str
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to null) -> USimpleNameReferenceExpression (identifier = isNotEmpty) -> FUN: isNotEmpty
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = isNotEmpty) -> FUN: isNotEmpty
UBinaryExpression (operator = !=) -> USimpleNameReferenceExpression (identifier = !=) -> null: null
UTypeReferenceExpression (name = int) -> USimpleNameReferenceExpression (identifier = Int) -> Decompiled_Class: Integer
UTypeReferenceExpression (name = kotlin.Unit) -> USimpleNameReferenceExpression (identifier = Unit) -> Decompiled_Class: Unit
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to null) -> USimpleNameReferenceExpression (identifier = TODO) -> FUN: TODO
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = TODO) -> FUN: TODO
UTypeReferenceExpression (name = int) -> USimpleNameReferenceExpression (identifier = Int) -> Decompiled_Class: Integer
UBlockExpression -> UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0)) -> Decompiled_Method:
UTypeReferenceExpression (name = int) -> USimpleNameReferenceExpression (identifier = Int) -> Decompiled_Class: Integer
UTypeReferenceExpression (name = kotlin.Unit) -> USimpleNameReferenceExpression (identifier = Unit) -> Decompiled_Class: Unit
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to null) -> USimpleNameReferenceExpression (identifier = TODO) -> FUN: TODO
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = TODO) -> FUN: TODO
UTypeReferenceExpression (name = int) -> USimpleNameReferenceExpression (identifier = Int) -> Decompiled_Class: Integer
UTypeReferenceExpression (name = kotlin.Unit) -> USimpleNameReferenceExpression (identifier = Unit) -> Decompiled_Class: Unit
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to null) -> USimpleNameReferenceExpression (identifier = TODO) -> FUN: TODO
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = TODO) -> FUN: TODO
UTypeReferenceExpression (name = int) -> USimpleNameReferenceExpression (identifier = Int) -> Decompiled_Class: Integer
UTypeReferenceExpression (name = kotlin.Unit) -> USimpleNameReferenceExpression (identifier = Unit) -> Decompiled_Class: Unit
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to null) -> USimpleNameReferenceExpression (identifier = TODO) -> FUN: TODO
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = TODO) -> FUN: TODO
UTypeReferenceExpression (name = int) -> USimpleNameReferenceExpression (identifier = Int) -> Decompiled_Class: Integer
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Kotlin_Light_Method) -> USimpleNameReferenceExpression (identifier = funPlainCall) -> Kotlin_Light_Method: funPlainCall
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Kotlin_Light_Method) -> USimpleNameReferenceExpression (identifier = funNamedArgumentsCall) -> Kotlin_Light_Method: funNamedArgumentsCall
......
......@@ -140,7 +140,7 @@ interface Pizza {
}: Pizza
UTypeReferenceExpression (name = Pizza.Ingredient) -> USimpleNameReferenceExpression (identifier = Ingredient) -> Kotlin_Light_Class:/** Ingredient of [Pizza] */
interface Ingredient: Ingredient
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to null) -> USimpleNameReferenceExpression (identifier = mutableSetOf) -> FUN: mutableSetOf
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = mutableSetOf) -> FUN: mutableSetOf
UComment -> USimpleNameReferenceExpression (identifier = ingredient) -> VALUE_PARAMETER: ingredient
UComment -> USimpleNameReferenceExpression (identifier = ingredients) -> PROPERTY: ingredients
UComment -> USimpleNameReferenceExpression (identifier = P) -> TYPE_PARAMETER: P
......
......@@ -25,11 +25,11 @@ internal open class TypeBase<T>: TypeBase
UQualifiedReferenceExpression -> USimpleNameReferenceExpression (identifier = java) -> Decompiled_Method: getJavaClass
UQualifiedReferenceExpression -> USimpleNameReferenceExpression (identifier = genericSuperclass) -> Decompiled_Method: getGenericSuperclass
UPostfixExpression (operator = !!) -> USimpleNameReferenceExpression (identifier = !!) -> null: null
UPostfixExpression (operator = !!) -> UQualifiedReferenceExpression -> null: null
UPostfixExpression (operator = !!) -> UQualifiedReferenceExpression -> Decompiled_Method: first
UQualifiedReferenceExpression -> UQualifiedReferenceExpression -> Decompiled_Method: getActualTypeArguments
UBinaryExpressionWithType -> USimpleNameReferenceExpression (identifier = superType) -> Kotlin_Light_Variable: superType
UBinaryExpressionWithType -> USimpleNameReferenceExpression (identifier = as) -> null: null
UTypeReferenceExpression (name = java.lang.reflect.ParameterizedType) -> USimpleNameReferenceExpression (identifier = ParameterizedType) -> Decompiled_Class: ParameterizedType
UQualifiedReferenceExpression -> USimpleNameReferenceExpression (identifier = actualTypeArguments) -> Decompiled_Method: getActualTypeArguments
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to null) -> USimpleNameReferenceExpression (identifier = first) -> FUN: first
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = first) -> FUN: first
UPostfixExpression (operator = !!) -> USimpleNameReferenceExpression (identifier = !!) -> null: null
UTypeReferenceExpression (name = int) -> USimpleNameReferenceExpression (identifier = Int) -> Decompiled_Class: Integer
UTypeReferenceExpression (name = int) -> USimpleNameReferenceExpression (identifier = Int) -> Decompiled_Class: Integer
UTypeReferenceExpression (name = int) -> USimpleNameReferenceExpression (identifier = Int) -> Decompiled_Class: Integer
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to null) -> USimpleNameReferenceExpression (identifier = lazy) -> FUN: lazy
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = lazy) -> FUN: lazy
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 3))(resolves to Kotlin_Light_Method) -> USimpleNameReferenceExpression (identifier = MyColor) -> Kotlin_Light_Method: MyColor
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to null) -> USimpleNameReferenceExpression (identifier = lazy) -> FUN: lazy
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = lazy) -> FUN: lazy
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 3))(resolves to Kotlin_Light_Method) -> USimpleNameReferenceExpression (identifier = MyColor) -> Kotlin_Light_Method: MyColor
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 3))(resolves to Kotlin_Light_Method) -> USimpleNameReferenceExpression (identifier = MyColor) -> Kotlin_Light_Method: MyColor
......@@ -2,10 +2,10 @@ UTypeReferenceExpression (name = Some<T>) -> USimpleNameReferenceExpression (ide
UTypeReferenceExpression (name = T) -> USimpleNameReferenceExpression (identifier = T) -> Kotlin_Light_Type_Parameter: T
UTypeReferenceExpression (name = java.util.List<? extends java.lang.Object>) -> USimpleNameReferenceExpression (identifier = List) -> Decompiled_Class: List
UTypeReferenceExpression (name = java.lang.Object) -> USimpleNameReferenceExpression (identifier = Any) -> Decompiled_Class: Object
UBlockExpression -> UQualifiedReferenceExpression -> null: null
UQualifiedReferenceExpression -> UQualifiedReferenceExpression -> null: null
UBlockExpression -> UQualifiedReferenceExpression -> Decompiled_Method: mapTo
UQualifiedReferenceExpression -> UQualifiedReferenceExpression -> Decompiled_Method: filterIsInstance
UQualifiedReferenceExpression -> USimpleNameReferenceExpression (identifier = list) -> Kotlin_Light_Value_Parameter: list
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to null) -> USimpleNameReferenceExpression (identifier = filterIsInstance) -> FUN: filterIsInstance
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = filterIsInstance) -> FUN: filterIsInstance
UTypeReferenceExpression (name = <ErrorType>) -> USimpleNameReferenceExpression (identifier = Some) -> Kotlin_Light_Class:class Some<T : Some<T>>: Some
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2))(resolves to null) -> USimpleNameReferenceExpression (identifier = mapTo) -> FUN: mapTo
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to null) -> USimpleNameReferenceExpression (identifier = mutableSetOf) -> FUN: mutableSetOf
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = mapTo) -> FUN: mapTo
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = mutableSetOf) -> FUN: mutableSetOf
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to null) -> USimpleNameReferenceExpression (identifier = buildString) -> FUN: buildString
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = buildString) -> FUN: buildString
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = append) -> Decompiled_Method: append
UBlockExpression -> UQualifiedReferenceExpression -> null: null
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to null) -> USimpleNameReferenceExpression (identifier = let) -> FUN: let
UBlockExpression -> UQualifiedReferenceExpression -> Decompiled_Method: let
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = let) -> FUN: let
UReturnExpression -> USimpleNameReferenceExpression (identifier = it) -> Kotlin_Light_Value_Parameter: it
......@@ -40,9 +40,9 @@ UQualifiedReferenceExpression -> USimpleNameReferenceExpression (identifier = ko
UBinaryExpression (operator = +) -> USimpleNameReferenceExpression (identifier = +) -> FUN: plus
UBinaryExpression (operator = +) -> USimpleNameReferenceExpression (identifier = b) -> Kotlin_Light_Variable: b
UTypeReferenceExpression (name = kotlin.Unit) -> USimpleNameReferenceExpression (identifier = Unit) -> Decompiled_Class: Unit
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2))(resolves to null) -> USimpleNameReferenceExpression (identifier = listOf) -> FUN: listOf
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = listOf) -> FUN: listOf
UTypeReferenceExpression (name = kotlin.Unit) -> USimpleNameReferenceExpression (identifier = Unit) -> Decompiled_Class: Unit
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to null) -> USimpleNameReferenceExpression (identifier = listOf) -> FUN: listOf
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = listOf) -> FUN: listOf
UTypeReferenceExpression (name = int) -> USimpleNameReferenceExpression (identifier = Int) -> Decompiled_Class: Integer
UTypeReferenceExpression (name = int) -> USimpleNameReferenceExpression (identifier = Int) -> Decompiled_Class: Integer
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = lmbd) -> Kotlin_Light_Value_Parameter: lmbd
......@@ -11,9 +11,9 @@ UQualifiedReferenceExpression -> USimpleNameReferenceExpression (identifier = St
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = empty) -> Decompiled_Method: empty
UTypeReferenceExpression (name = java.lang.String) -> USimpleNameReferenceExpression (identifier = String) -> Decompiled_Class: String
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = filter) -> Decompiled_Method: filter
UReturnExpression -> UQualifiedReferenceExpression -> null: null
UReturnExpression -> UQualifiedReferenceExpression -> Decompiled_Method: isEmpty
UQualifiedReferenceExpression -> USimpleNameReferenceExpression (identifier = it) -> Kotlin_Light_Value_Parameter: it
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to null) -> USimpleNameReferenceExpression (identifier = isEmpty) -> FUN: isEmpty
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = isEmpty) -> FUN: isEmpty
UTypeReferenceExpression (name = kotlin.Unit) -> USimpleNameReferenceExpression (identifier = Unit) -> Decompiled_Class: Unit
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = selectItemFunction) -> Kotlin_Light_Value_Parameter: selectItemFunction
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to null) -> USimpleNameReferenceExpression (identifier = Local) -> null: null
......
......@@ -47,11 +47,11 @@ UTypeReferenceExpression (name = float) -> USimpleNameReferenceExpression (ident
UQualifiedReferenceExpression -> USimpleNameReferenceExpression (identifier = lang) -> PsiPackage:java.lang: lang
UQualifiedReferenceExpression -> USimpleNameReferenceExpression (identifier = String) -> Decompiled_Class: String
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = format) -> Decompiled_Method: format
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2))(resolves to Decompiled_Method) -> UQualifiedReferenceExpression -> null: null
UQualifiedReferenceExpression -> UQualifiedReferenceExpression -> null: null
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to null) -> USimpleNameReferenceExpression (identifier = chunked) -> FUN: chunked
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to null) -> USimpleNameReferenceExpression (identifier = toTypedArray) -> FUN: toTypedArray
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2))(resolves to null) -> USimpleNameReferenceExpression (identifier = with) -> FUN: with
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2))(resolves to Decompiled_Method) -> UQualifiedReferenceExpression -> Decompiled_Method: toTypedArray
UQualifiedReferenceExpression -> UQualifiedReferenceExpression -> Decompiled_Method: chunked
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = chunked) -> FUN: chunked
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = toTypedArray) -> FUN: toTypedArray
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = with) -> FUN: with
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))(resolves to Kotlin_Light_Method) -> USimpleNameReferenceExpression (identifier = A) -> Kotlin_Light_Class:class A {
fun String.with2Receivers(a: Int, b: Float) {}
......
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to null) -> USimpleNameReferenceExpression (identifier = lazy) -> FUN: lazy
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to null) -> USimpleNameReferenceExpression (identifier = lazy) -> FUN: lazy
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = lazy) -> FUN: lazy
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = lazy) -> FUN: lazy
UTypeReferenceExpression (name = kotlin.Suppress) -> USimpleNameReferenceExpression (identifier = Suppress) -> Decompiled_Class: Suppress
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to null) -> USimpleNameReferenceExpression (identifier = lazy) -> FUN: lazy
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = lazy) -> FUN: lazy
UBinaryExpression (operator = +) -> USimpleNameReferenceExpression (identifier = +) -> FUN: plus
......@@ -7,4 +7,4 @@ UQualifiedReferenceExpression -> USimpleNameReferenceExpression (identifier = le
UTypeReferenceExpression (name = MyReceiverAnnotation) -> USimpleNameReferenceExpression (identifier = MyReceiverAnnotation) -> Kotlin_Light_Class:annotation class MyReceiverAnnotation(val name: String = ""): MyReceiverAnnotation
UTypeReferenceExpression (name = java.lang.String) -> USimpleNameReferenceExpression (identifier = String) -> Decompiled_Class: String
UTypeReferenceExpression (name = kotlin.text.Regex) -> USimpleNameReferenceExpression (identifier = Regex) -> Decompiled_Class: Regex
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to null) -> USimpleNameReferenceExpression (identifier = toRegex) -> FUN: toRegex
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = toRegex) -> FUN: toRegex
......@@ -2,12 +2,12 @@ UTypeReferenceExpression (name = java.lang.Object) -> USimpleNameReferenceExpres
UTypeReferenceExpression (name = T) -> USimpleNameReferenceExpression (identifier = T) -> TYPE_PARAMETER: T
UTypeReferenceExpression (name = kotlin.Unit) -> USimpleNameReferenceExpression (identifier = Unit) -> Decompiled_Class: Unit
UTypeReferenceExpression (name = T) -> USimpleNameReferenceExpression (identifier = T) -> Kotlin_Light_Type_Parameter: T
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to null) -> USimpleNameReferenceExpression (identifier = TODO) -> FUN: TODO
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = TODO) -> FUN: TODO
UTypeReferenceExpression (name = java.lang.Object) -> USimpleNameReferenceExpression (identifier = Any) -> Decompiled_Class: Object
UTypeReferenceExpression (name = T) -> USimpleNameReferenceExpression (identifier = T) -> Kotlin_Light_Type_Parameter: T
UTypeReferenceExpression (name = kotlin.Unit) -> USimpleNameReferenceExpression (identifier = Unit) -> Decompiled_Class: Unit
UTypeReferenceExpression (name = T) -> USimpleNameReferenceExpression (identifier = T) -> Kotlin_Light_Type_Parameter: T
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to null) -> USimpleNameReferenceExpression (identifier = TODO) -> FUN: TODO
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = TODO) -> FUN: TODO
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Kotlin_Light_Method) -> USimpleNameReferenceExpression (identifier = foo) -> Kotlin_Light_Method: foo
UTypeReferenceExpression (name = java.lang.String) -> USimpleNameReferenceExpression (identifier = String) -> Decompiled_Class: String
UTypeReferenceExpression (name = java.lang.String) -> USimpleNameReferenceExpression (identifier = String) -> Decompiled_Class: String
......@@ -16,7 +16,7 @@ UTypeReferenceExpression (name = T) -> USimpleNameReferenceExpression (identifie
UTypeReferenceExpression (name = java.lang.String) -> USimpleNameReferenceExpression (identifier = String) -> Decompiled_Class: String
UTypeReferenceExpression (name = java.lang.String) -> USimpleNameReferenceExpression (identifier = String) -> Decompiled_Class: String
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Kotlin_Light_Method) -> USimpleNameReferenceExpression (identifier = bar) -> Kotlin_Light_Method: bar
ULocalVariable (name = z) -> UQualifiedReferenceExpression -> null: null
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to null) -> USimpleNameReferenceExpression (identifier = listOf) -> FUN: listOf
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to null) -> USimpleNameReferenceExpression (identifier = filterIsInstance) -> FUN: filterIsInstance
ULocalVariable (name = z) -> UQualifiedReferenceExpression -> Decompiled_Method: filterIsInstance
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = listOf) -> FUN: listOf
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = filterIsInstance) -> FUN: filterIsInstance
UTypeReferenceExpression (name = java.lang.String) -> USimpleNameReferenceExpression (identifier = String) -> Decompiled_Class: String
......@@ -87,4 +87,4 @@ UTypeReferenceExpression (name = T) -> USimpleNameReferenceExpression (identifie
UReturnExpression -> USimpleNameReferenceExpression (identifier = threshold2) -> Kotlin_Light_Value_Parameter: threshold2
UTypeReferenceExpression (name = T) -> USimpleNameReferenceExpression (identifier = T) -> Kotlin_Light_Type_Parameter: T
UTypeReferenceExpression (name = Z) -> USimpleNameReferenceExpression (identifier = Z) -> Kotlin_Light_Type_Parameter: Z
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to null) -> USimpleNameReferenceExpression (identifier = TODO) -> FUN: TODO
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = TODO) -> FUN: TODO
......@@ -14,25 +14,25 @@ UBlockExpression -> UQualifiedReferenceExpression -> Kotlin_Light_Method: foo
}
}: A
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Kotlin_Light_Method) -> USimpleNameReferenceExpression (identifier = inlineFoo) -> Kotlin_Light_Method: inlineFoo
UBlockExpression -> UQualifiedReferenceExpression -> null: null
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to null) -> USimpleNameReferenceExpression (identifier = listOf) -> FUN: listOf
UBlockExpression -> UQualifiedReferenceExpression -> Decompiled_Method: forEach
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = listOf) -> FUN: listOf
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))(resolves to Kotlin_Light_Method) -> USimpleNameReferenceExpression (identifier = A) -> Kotlin_Light_Class:open class A {
fun foo() {}
inline fun inlineFoo() {
}
}: A
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to null) -> USimpleNameReferenceExpression (identifier = forEach) -> FUN: forEach
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = forEach) -> FUN: forEach
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = println) -> Decompiled_Method: println
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = it) -> Kotlin_Light_Value_Parameter: it
UBlockExpression -> UQualifiedReferenceExpression -> null: null
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to null) -> USimpleNameReferenceExpression (identifier = listOf) -> FUN: listOf
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to null) -> USimpleNameReferenceExpression (identifier = joinToString) -> FUN: joinToString
UBlockExpression -> UQualifiedReferenceExpression -> Decompiled_Method: joinToString
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = listOf) -> FUN: listOf
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = joinToString) -> FUN: joinToString
UBlockExpression -> UQualifiedReferenceExpression -> PROPERTY: size
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to null) -> USimpleNameReferenceExpression (identifier = listOf) -> FUN: listOf
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = listOf) -> FUN: listOf
UQualifiedReferenceExpression -> USimpleNameReferenceExpression (identifier = size) -> PROPERTY: size
UBlockExpression -> UQualifiedReferenceExpression -> PROPERTY: indices
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to null) -> USimpleNameReferenceExpression (identifier = listOf) -> FUN: listOf
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = listOf) -> FUN: listOf
UQualifiedReferenceExpression -> USimpleNameReferenceExpression (identifier = indices) -> PROPERTY: indices
UTypeReferenceExpression (name = java.util.Date) -> USimpleNameReferenceExpression (identifier = java) -> PsiPackage:java: java
UTypeReferenceExpression (name = java.util.Date) -> USimpleNameReferenceExpression (identifier = util) -> PsiPackage:java.util: util
......@@ -46,23 +46,23 @@ UBlockExpression -> UQualifiedReferenceExpression -> Kotlin_Light_Method: foo
UQualifiedReferenceExpression -> USimpleNameReferenceExpression (identifier = date) -> Kotlin_Light_Variable: date
UQualifiedReferenceExpression -> USimpleNameReferenceExpression (identifier = time) -> Decompiled_Method: setTime
UBinaryExpression (operator = =) -> USimpleNameReferenceExpression (identifier = =) -> null: null
UBlockExpression -> UQualifiedReferenceExpression -> null: null
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to null) -> USimpleNameReferenceExpression (identifier = listOf) -> FUN: listOf
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to null) -> USimpleNameReferenceExpression (identifier = last) -> FUN: last
UBlockExpression -> UQualifiedReferenceExpression -> Decompiled_Method: last
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = listOf) -> FUN: listOf
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = last) -> FUN: last
UBlockExpression -> UQualifiedReferenceExpression -> Decompiled_Method: setValue
UQualifiedReferenceExpression -> UQualifiedReferenceExpression -> null: null
UQualifiedReferenceExpression -> UQualifiedReferenceExpression -> Decompiled_Method: first
UQualifiedReferenceExpression -> UQualifiedReferenceExpression -> PROPERTY: entries
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to null) -> USimpleNameReferenceExpression (identifier = mutableMapOf) -> FUN: mutableMapOf
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = mutableMapOf) -> FUN: mutableMapOf
UBinaryExpression (operator = <other>) -> USimpleNameReferenceExpression (identifier = to) -> Decompiled_Method: to
UQualifiedReferenceExpression -> USimpleNameReferenceExpression (identifier = entries) -> PROPERTY: entries
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to null) -> USimpleNameReferenceExpression (identifier = first) -> FUN: first
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = first) -> FUN: first
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = setValue) -> FUN: setValue
UTypeReferenceExpression (name = kotlin.ranges.ClosedRange<java.lang.Long>) -> USimpleNameReferenceExpression (identifier = ClosedRange) -> Decompiled_Class: ClosedRange
UTypeReferenceExpression (name = long) -> USimpleNameReferenceExpression (identifier = Long) -> Decompiled_Class: Long
UBinaryExpression (operator = ..) -> USimpleNameReferenceExpression (identifier = ..) -> FUN: rangeTo
UBlockExpression -> UQualifiedReferenceExpression -> null: null
UBlockExpression -> UQualifiedReferenceExpression -> Decompiled_Method: contains
UQualifiedReferenceExpression -> USimpleNameReferenceExpression (identifier = intRange) -> Kotlin_Light_Variable: intRange
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to null) -> USimpleNameReferenceExpression (identifier = contains) -> FUN: contains
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = contains) -> FUN: contains
UBinaryExpressionWithType -> USimpleNameReferenceExpression (identifier = as) -> null: null
UTypeReferenceExpression (name = int) -> USimpleNameReferenceExpression (identifier = Int) -> Decompiled_Class: Integer
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 2))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = IntRange) -> Decompiled_Class: IntRange
......
......@@ -56,8 +56,8 @@ UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolve
UTypeReferenceExpression (name = java.util.function.Supplier<java.lang.String>) -> USimpleNameReferenceExpression (identifier = Supplier) -> Decompiled_Class: Supplier
UTypeReferenceExpression (name = java.lang.String) -> USimpleNameReferenceExpression (identifier = String) -> Decompiled_Class: String
UTypeReferenceExpression (name = java.lang.String) -> USimpleNameReferenceExpression (identifier = String) -> Decompiled_Class: String
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to null) -> USimpleNameReferenceExpression (identifier = TODO) -> FUN: TODO
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = TODO) -> FUN: TODO
UTypeReferenceExpression (name = java.util.concurrent.Callable<java.lang.String>) -> USimpleNameReferenceExpression (identifier = Callable) -> Decompiled_Class: Callable
UTypeReferenceExpression (name = java.lang.String) -> USimpleNameReferenceExpression (identifier = String) -> Decompiled_Class: String
UTypeReferenceExpression (name = java.lang.String) -> USimpleNameReferenceExpression (identifier = String) -> Decompiled_Class: String
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to null) -> USimpleNameReferenceExpression (identifier = TODO) -> FUN: TODO
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = TODO) -> FUN: TODO
UPolyadicExpression (operator = +) -> USimpleNameReferenceExpression (identifier = case4) -> Kotlin_Light_Method: getCase4
UPolyadicExpression (operator = +) -> USimpleNameReferenceExpression (identifier = case4) -> Kotlin_Light_Method: getCase4
UPolyadicExpression (operator = +) -> UQualifiedReferenceExpression -> null: null
UPolyadicExpression (operator = +) -> UQualifiedReferenceExpression -> null: null
UPolyadicExpression (operator = +) -> UQualifiedReferenceExpression -> Decompiled_Method: repeat
UPolyadicExpression (operator = +) -> UQualifiedReferenceExpression -> Decompiled_Method: repeat
UPolyadicExpression (operator = +) -> USimpleNameReferenceExpression (identifier = case4) -> Kotlin_Light_Method: getCase4
UPolyadicExpression (operator = +) -> USimpleNameReferenceExpression (identifier = case4) -> Kotlin_Light_Method: getCase4
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to null) -> USimpleNameReferenceExpression (identifier = repeat) -> FUN: repeat
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))(resolves to Decompiled_Method) -> USimpleNameReferenceExpression (identifier = repeat) -> FUN: repeat
UTypeReferenceExpression (name = int) -> USimpleNameReferenceExpression (identifier = Int) -> Decompiled_Class: Integer
UReturnExpression -> USimpleNameReferenceExpression (identifier = i) -> Kotlin_Light_Value_Parameter: i
UReturnExpression -> USimpleNameReferenceExpression (identifier = i) -> Kotlin_Light_Value_Parameter: i
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment