Kotlin UAST should visit property delegate expression

#KT-15164 Fixed
This commit is contained in:
Vyacheslav Gerasimov
2017-06-05 17:18:39 +03:00
parent 15bfd4439a
commit 643e3587cc
6 changed files with 70 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
val sdCardPath by lazy { "/sdcard" }
fun localPropertyTest() {
val sdCardPathLocal by lazy { "/sdcard" }
}
+21
View File
@@ -0,0 +1,21 @@
UFile (package = )
UClass (name = PropertyDelegateKt)
UField (name = sdCardPath$delegate)
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
UIdentifier (Identifier (lazy))
USimpleNameReferenceExpression (identifier = lazy)
ULambdaExpression
UBlockExpression
ULiteralExpression (value = "/sdcard")
UAnnotationMethod (name = getSdCardPath)
UAnnotationMethod (name = localPropertyTest)
UBlockExpression
UDeclarationsExpression
ULocalVariable (name = sdCardPathLocal)
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
UIdentifier (Identifier (lazy))
USimpleNameReferenceExpression (identifier = lazy)
ULambdaExpression
UBlockExpression
ULiteralExpression (value = "/sdcard")
@@ -0,0 +1,7 @@
public final class PropertyDelegateKt {
private static final var sdCardPath$delegate: kotlin.Lazy
public static final fun getSdCardPath() : java.lang.String = UastEmptyExpression
public static final fun localPropertyTest() : void {
var sdCardPathLocal: <ErrorType>
}
}