-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stub creation from cls fixed for suspend function types
- Loading branch information
Showing
4 changed files
with
142 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
idea/testData/decompiler/stubBuilder/SuspendLambda/SuspendLambda.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package test | ||
|
||
class SuspendLambda { | ||
fun <T> (suspend () -> T).createCoroutine(completion: Continuation<T>) {} | ||
|
||
fun <T> testCoroutine(f: suspend (Int) -> T?) {} | ||
|
||
fun <T> testCoroutineWithAnnotation(f: suspend (Int) -> @A T?) {} | ||
} | ||
|
||
@Target(AnnotationTarget.TYPE, AnnotationTarget.TYPE_PARAMETER) | ||
annotation class A | ||
|
||
class Continuation<T> {} |
96 changes: 96 additions & 0 deletions
96
idea/testData/decompiler/stubBuilder/SuspendLambda/SuspendLambda.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
PsiJetFileStubImpl[package=test] | ||
PACKAGE_DIRECTIVE | ||
REFERENCE_EXPRESSION[referencedName=test] | ||
IMPORT_LIST | ||
CLASS[fqName=test.SuspendLambda, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=true, name=SuspendLambda, superNames=[]] | ||
MODIFIER_LIST[public final] | ||
PRIMARY_CONSTRUCTOR | ||
MODIFIER_LIST[public] | ||
VALUE_PARAMETER_LIST | ||
CLASS_BODY | ||
FUN[fqName=test.SuspendLambda.testCoroutine, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=true, isExtension=false, isTopLevel=false, name=testCoroutine] | ||
MODIFIER_LIST[public final] | ||
TYPE_PARAMETER_LIST | ||
TYPE_PARAMETER[fqName=null, isInVariance=false, isOutVariance=false, name=T] | ||
VALUE_PARAMETER_LIST | ||
VALUE_PARAMETER[fqName=null, hasDefaultValue=false, hasValOrVar=false, isMutable=false, name=f] | ||
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=kotlin] | ||
REFERENCE_EXPRESSION[referencedName=Int] | ||
TYPE_REFERENCE | ||
NULLABLE_TYPE | ||
USER_TYPE | ||
REFERENCE_EXPRESSION[referencedName=T] | ||
TYPE_REFERENCE | ||
USER_TYPE | ||
USER_TYPE | ||
REFERENCE_EXPRESSION[referencedName=kotlin] | ||
REFERENCE_EXPRESSION[referencedName=Unit] | ||
FUN[fqName=test.SuspendLambda.testCoroutineWithAnnotation, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=true, isExtension=false, isTopLevel=false, name=testCoroutineWithAnnotation] | ||
MODIFIER_LIST[public final] | ||
TYPE_PARAMETER_LIST | ||
TYPE_PARAMETER[fqName=null, isInVariance=false, isOutVariance=false, name=T] | ||
VALUE_PARAMETER_LIST | ||
VALUE_PARAMETER[fqName=null, hasDefaultValue=false, hasValOrVar=false, isMutable=false, name=f] | ||
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=kotlin] | ||
REFERENCE_EXPRESSION[referencedName=Int] | ||
TYPE_REFERENCE | ||
MODIFIER_LIST[] | ||
ANNOTATION_ENTRY[hasValueArguments=false, shortName=A] | ||
CONSTRUCTOR_CALLEE | ||
TYPE_REFERENCE | ||
USER_TYPE | ||
USER_TYPE | ||
REFERENCE_EXPRESSION[referencedName=test] | ||
REFERENCE_EXPRESSION[referencedName=A] | ||
NULLABLE_TYPE | ||
USER_TYPE | ||
REFERENCE_EXPRESSION[referencedName=T] | ||
TYPE_REFERENCE | ||
USER_TYPE | ||
USER_TYPE | ||
REFERENCE_EXPRESSION[referencedName=kotlin] | ||
REFERENCE_EXPRESSION[referencedName=Unit] | ||
FUN[fqName=test.SuspendLambda.createCoroutine, hasBlockBody=true, hasBody=true, hasTypeParameterListBeforeFunctionName=true, isExtension=true, isTopLevel=false, name=createCoroutine] | ||
MODIFIER_LIST[public final] | ||
TYPE_PARAMETER_LIST | ||
TYPE_PARAMETER[fqName=null, isInVariance=false, isOutVariance=false, name=T] | ||
TYPE_REFERENCE | ||
MODIFIER_LIST[suspend] | ||
FUNCTION_TYPE | ||
VALUE_PARAMETER_LIST | ||
TYPE_REFERENCE | ||
USER_TYPE | ||
REFERENCE_EXPRESSION[referencedName=T] | ||
VALUE_PARAMETER_LIST | ||
VALUE_PARAMETER[fqName=null, hasDefaultValue=false, hasValOrVar=false, isMutable=false, name=completion] | ||
TYPE_REFERENCE | ||
USER_TYPE | ||
USER_TYPE | ||
REFERENCE_EXPRESSION[referencedName=test] | ||
REFERENCE_EXPRESSION[referencedName=Continuation] | ||
TYPE_ARGUMENT_LIST | ||
TYPE_PROJECTION[projectionKind=NONE] | ||
TYPE_REFERENCE | ||
USER_TYPE | ||
REFERENCE_EXPRESSION[referencedName=T] | ||
TYPE_REFERENCE | ||
USER_TYPE | ||
USER_TYPE | ||
REFERENCE_EXPRESSION[referencedName=kotlin] | ||
REFERENCE_EXPRESSION[referencedName=Unit] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters