diff --git a/idea/testData/decompiler/stubBuilder/SuspendLambda/SuspendLambda.kt b/idea/testData/decompiler/stubBuilder/SuspendLambda/SuspendLambda.kt index 7a8ef91003a..cb042235c43 100644 --- a/idea/testData/decompiler/stubBuilder/SuspendLambda/SuspendLambda.kt +++ b/idea/testData/decompiler/stubBuilder/SuspendLambda/SuspendLambda.kt @@ -17,6 +17,9 @@ class SuspendLambda { var nullableSuspendWithNullableReceiver: (suspend RS?.(P) -> Unit)? = null var nullableSuspendWithAnnotation: (@A() suspend (P) -> Unit)? = null + + fun override(p: String, b: (suspend (P) -> Unit)) = null + fun override(b: (suspend (P) -> Unit)) = null } interface P diff --git a/idea/testData/decompiler/stubBuilder/SuspendLambda/SuspendLambda.txt b/idea/testData/decompiler/stubBuilder/SuspendLambda/SuspendLambda.txt index 10c0046b0bf..af7de2ae676 100644 --- a/idea/testData/decompiler/stubBuilder/SuspendLambda/SuspendLambda.txt +++ b/idea/testData/decompiler/stubBuilder/SuspendLambda/SuspendLambda.txt @@ -119,6 +119,62 @@ PsiJetFileStubImpl[package=test] USER_TYPE REFERENCE_EXPRESSION[referencedName=kotlin] REFERENCE_EXPRESSION[referencedName=Unit] + FUN[fqName=test.SuspendLambda.override, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isTopLevel=false, name=override] + MODIFIER_LIST[public final] + VALUE_PARAMETER_LIST + VALUE_PARAMETER[fqName=null, hasDefaultValue=false, hasValOrVar=false, isMutable=false, name=p] + TYPE_REFERENCE + USER_TYPE + USER_TYPE + REFERENCE_EXPRESSION[referencedName=kotlin] + REFERENCE_EXPRESSION[referencedName=String] + VALUE_PARAMETER[fqName=null, hasDefaultValue=false, hasValOrVar=false, isMutable=false, name=b] + TYPE_REFERENCE + MODIFIER_LIST[suspend] + FUNCTION_TYPE + VALUE_PARAMETER_LIST + VALUE_PARAMETER[fqName=null, hasDefaultValue=false, hasValOrVar=false, isMutable=false, name=null] + TYPE_REFERENCE + USER_TYPE + USER_TYPE + REFERENCE_EXPRESSION[referencedName=test] + REFERENCE_EXPRESSION[referencedName=P] + TYPE_REFERENCE + USER_TYPE + USER_TYPE + REFERENCE_EXPRESSION[referencedName=kotlin] + REFERENCE_EXPRESSION[referencedName=Unit] + TYPE_REFERENCE + NULLABLE_TYPE + USER_TYPE + USER_TYPE + REFERENCE_EXPRESSION[referencedName=kotlin] + REFERENCE_EXPRESSION[referencedName=Nothing] + FUN[fqName=test.SuspendLambda.override, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isTopLevel=false, name=override] + MODIFIER_LIST[public final] + VALUE_PARAMETER_LIST + VALUE_PARAMETER[fqName=null, hasDefaultValue=false, hasValOrVar=false, isMutable=false, name=b] + TYPE_REFERENCE + MODIFIER_LIST[suspend] + FUNCTION_TYPE + VALUE_PARAMETER_LIST + VALUE_PARAMETER[fqName=null, hasDefaultValue=false, hasValOrVar=false, isMutable=false, name=null] + TYPE_REFERENCE + USER_TYPE + USER_TYPE + REFERENCE_EXPRESSION[referencedName=test] + REFERENCE_EXPRESSION[referencedName=P] + TYPE_REFERENCE + USER_TYPE + USER_TYPE + REFERENCE_EXPRESSION[referencedName=kotlin] + REFERENCE_EXPRESSION[referencedName=Unit] + TYPE_REFERENCE + NULLABLE_TYPE + USER_TYPE + USER_TYPE + REFERENCE_EXPRESSION[referencedName=kotlin] + REFERENCE_EXPRESSION[referencedName=Nothing] FUN[fqName=test.SuspendLambda.testCoroutine, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=true, isExtension=false, isTopLevel=false, name=testCoroutine] MODIFIER_LIST[public final] TYPE_PARAMETER_LIST diff --git a/idea/testData/decompiler/stubBuilder/TypeAliases/Dependency.kt b/idea/testData/decompiler/stubBuilder/TypeAliases/Dependency.kt index f6e5c1108e8..da4ee277342 100644 --- a/idea/testData/decompiler/stubBuilder/TypeAliases/Dependency.kt +++ b/idea/testData/decompiler/stubBuilder/TypeAliases/Dependency.kt @@ -5,3 +5,5 @@ typealias A = () -> Unit fun foo(a: A) { a.invoke() } + +class SomeClass \ No newline at end of file diff --git a/idea/testData/decompiler/stubBuilder/TypeAliases/TypeAliases.kt b/idea/testData/decompiler/stubBuilder/TypeAliases/TypeAliases.kt index 75a7612b19e..5e0d879f2c1 100644 --- a/idea/testData/decompiler/stubBuilder/TypeAliases/TypeAliases.kt +++ b/idea/testData/decompiler/stubBuilder/TypeAliases/TypeAliases.kt @@ -25,4 +25,11 @@ class TypeAliases { @Ann @Suppress("TOPLEVEL_TYPEALIASES_ONLY") private typealias Parametrized = Map + + fun order(path: String) {} + fun order(body: Z) {} } + + +typealias Z = dependency.SomeClass // dependency.SomeClass is before (lexicography) kotlin.String, but test.Z is after + diff --git a/idea/testData/decompiler/stubBuilder/TypeAliases/TypeAliases.txt b/idea/testData/decompiler/stubBuilder/TypeAliases/TypeAliases.txt index 00007483989..dfe3a14b92a 100644 --- a/idea/testData/decompiler/stubBuilder/TypeAliases/TypeAliases.txt +++ b/idea/testData/decompiler/stubBuilder/TypeAliases/TypeAliases.txt @@ -67,6 +67,34 @@ PsiJetFileStubImpl[package=test] USER_TYPE REFERENCE_EXPRESSION[referencedName=kotlin] REFERENCE_EXPRESSION[referencedName=Unit] + FUN[fqName=test.TypeAliases.order, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isTopLevel=false, name=order] + MODIFIER_LIST[public final] + VALUE_PARAMETER_LIST + VALUE_PARAMETER[fqName=null, hasDefaultValue=false, hasValOrVar=false, isMutable=false, name=path] + TYPE_REFERENCE + USER_TYPE + USER_TYPE + REFERENCE_EXPRESSION[referencedName=kotlin] + REFERENCE_EXPRESSION[referencedName=String] + TYPE_REFERENCE + USER_TYPE + USER_TYPE + REFERENCE_EXPRESSION[referencedName=kotlin] + REFERENCE_EXPRESSION[referencedName=Unit] + FUN[fqName=test.TypeAliases.order, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=false, isExtension=false, isTopLevel=false, name=order] + MODIFIER_LIST[public final] + VALUE_PARAMETER_LIST + VALUE_PARAMETER[fqName=null, hasDefaultValue=false, hasValOrVar=false, isMutable=false, name=body] + TYPE_REFERENCE + USER_TYPE + USER_TYPE + REFERENCE_EXPRESSION[referencedName=test] + REFERENCE_EXPRESSION[referencedName=Z] + TYPE_REFERENCE + USER_TYPE + USER_TYPE + REFERENCE_EXPRESSION[referencedName=kotlin] + REFERENCE_EXPRESSION[referencedName=Unit] TYPEALIAS[fqName=test.TypeAliases.B, isTopLevel=false, name=B] MODIFIER_LIST[public] ANNOTATION_ENTRY[hasValueArguments=false, shortName=Suppress]