Uast: tests for UClass.uastSuperTypes
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
import java.io.Closeable
|
||||
import java.io.InputStream
|
||||
|
||||
|
||||
fun foo() {
|
||||
val runnable = object : Runnable { override fun run() {} }
|
||||
runnable.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() {} }
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
UFile (package = )
|
||||
UImportStatement (isOnDemand = false)
|
||||
UImportStatement (isOnDemand = false)
|
||||
UClass (name = AnonymousKt)
|
||||
UAnnotationMethod (name = foo)
|
||||
UBlockExpression
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = runnable)
|
||||
UObjectLiteralExpression
|
||||
UClass (name = null)
|
||||
UAnnotationMethod (name = run)
|
||||
UBlockExpression
|
||||
UAnnotationMethod (name = AnonymousKt$foo$runnable$1)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = runnable)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (run))
|
||||
USimpleNameReferenceExpression (identifier = run)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = closeableRunnable)
|
||||
UObjectLiteralExpression
|
||||
UClass (name = null)
|
||||
UAnnotationMethod (name = close)
|
||||
UBlockExpression
|
||||
UAnnotationMethod (name = run)
|
||||
UBlockExpression
|
||||
UAnnotationMethod (name = AnonymousKt$foo$closeableRunnable$1)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = runnableIs)
|
||||
UObjectLiteralExpression
|
||||
UClass (name = null)
|
||||
UAnnotationMethod (name = read)
|
||||
ULiteralExpression (value = 0)
|
||||
UAnnotationMethod (name = run)
|
||||
UBlockExpression
|
||||
UAnnotationMethod (name = AnonymousKt$foo$runnableIs$1)
|
||||
@@ -0,0 +1,11 @@
|
||||
import java.io.Closeable
|
||||
import java.io.InputStream
|
||||
|
||||
public final class AnonymousKt {
|
||||
public static final fun foo() : void {
|
||||
var runnable: <ErrorType> = anonymous object : Runnable { override fun run() {} }
|
||||
runnable.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