Uast: consistency updates for ULambdaExpression
This commit is contained in:
+2
@@ -5,6 +5,8 @@ import java.io.InputStream
|
||||
fun foo() {
|
||||
val runnable = object : Runnable { override fun run() {} }
|
||||
runnable.run()
|
||||
val runnable2 = Runnable { println() }
|
||||
runnable2.run()
|
||||
val closeableRunnable = object : Runnable, Closeable { override fun close() {} override fun run() {} }
|
||||
val runnableIs = object : InputStream(), Runnable { override fun read(): Int = 0; override fun run() {} }
|
||||
}
|
||||
+15
@@ -16,6 +16,21 @@ UFile (package = )
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (run))
|
||||
USimpleNameReferenceExpression (identifier = run)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = runnable2)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||
UIdentifier (Identifier (Runnable))
|
||||
USimpleNameReferenceExpression (identifier = Runnable)
|
||||
ULambdaExpression
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (println))
|
||||
USimpleNameReferenceExpression (identifier = println)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = runnable2)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (run))
|
||||
USimpleNameReferenceExpression (identifier = run)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = closeableRunnable)
|
||||
UObjectLiteralExpression
|
||||
|
||||
@@ -5,6 +5,10 @@ public final class AnonymousKt {
|
||||
public static final fun foo() : void {
|
||||
var runnable: <ErrorType> = anonymous object : Runnable { override fun run() {} }
|
||||
runnable.run()
|
||||
var runnable2: java.lang.Runnable = Runnable({
|
||||
println()
|
||||
})
|
||||
runnable2.run()
|
||||
var closeableRunnable: <ErrorType> = anonymous object : Runnable, Closeable { override fun close() {} override fun run() {} }
|
||||
var runnableIs: <ErrorType> = anonymous object : InputStream(), Runnable { override fun read(): Int = 0; override fun run() {} }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user