Uast: handling @receiver annotations
This commit is contained in:
committed by
Nikolay Krasko
parent
f91f42c253
commit
f8601479de
+3
@@ -0,0 +1,3 @@
|
||||
annotation class MyReceiverAnnotation
|
||||
|
||||
fun @receiver:MyReceiverAnnotation String.foo() = this.length
|
||||
@@ -0,0 +1,10 @@
|
||||
UFile (package = )
|
||||
UClass (name = ReceiverFunKt)
|
||||
UAnnotationMethod (name = foo)
|
||||
UParameter (name = $receiver)
|
||||
UAnnotation (fqName = MyReceiverAnnotation)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UQualifiedReferenceExpression
|
||||
UThisExpression (label = null)
|
||||
USimpleNameReferenceExpression (identifier = length)
|
||||
UClass (name = MyReceiverAnnotation)
|
||||
@@ -0,0 +1,6 @@
|
||||
public final class ReceiverFunKt {
|
||||
public static final fun foo(@MyReceiverAnnotation @org.jetbrains.annotations.NotNull $receiver: java.lang.String) : int = this.length
|
||||
}
|
||||
|
||||
public abstract annotation MyReceiverAnnotation {
|
||||
}
|
||||
Reference in New Issue
Block a user