Uast: KotlinIDERenderLogTest for running UAST tests with ULC
In case of result difference the `-ide`-suffixed testdata is used. Actually the difference in results is more likely to be a bug but currently we are fixating at least some behaviour to protect from unexpected regressions in Ultra Light Classes. `object Local` were removed because there is no local objects in actual Kotlin syntax
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
UFile (package = )
|
||||
UImportStatement (isOnDemand = false)
|
||||
UImportStatement (isOnDemand = false)
|
||||
UClass (name = AnonymousKt)
|
||||
UMethod (name = foo)
|
||||
UBlockExpression
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = runnable)
|
||||
UObjectLiteralExpression
|
||||
UClass (name = null)
|
||||
UMethod (name = run)
|
||||
UBlockExpression
|
||||
UMethod (name = )
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = runnable)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (run))
|
||||
USimpleNameReferenceExpression (identifier = run, resolvesTo = null)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = runnable2)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||
UIdentifier (Identifier (Runnable))
|
||||
USimpleNameReferenceExpression (identifier = Runnable, resolvesTo = Runnable)
|
||||
ULambdaExpression
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (println))
|
||||
USimpleNameReferenceExpression (identifier = println, resolvesTo = null)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = runnable2)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (run))
|
||||
USimpleNameReferenceExpression (identifier = run, resolvesTo = null)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = closeableRunnable)
|
||||
UObjectLiteralExpression
|
||||
UClass (name = null)
|
||||
UMethod (name = close)
|
||||
UBlockExpression
|
||||
UMethod (name = run)
|
||||
UBlockExpression
|
||||
UMethod (name = )
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = runnableIs)
|
||||
UObjectLiteralExpression
|
||||
UClass (name = null)
|
||||
UMethod (name = read)
|
||||
UBlockExpression
|
||||
UReturnExpression
|
||||
ULiteralExpression (value = 0)
|
||||
UMethod (name = run)
|
||||
UBlockExpression
|
||||
UMethod (name = )
|
||||
UMethod (name = withErr)
|
||||
UBlockExpression
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = runnable)
|
||||
UObjectLiteralExpression
|
||||
UClass (name = <invalid object code>)
|
||||
@@ -0,0 +1,49 @@
|
||||
UFile (package = )
|
||||
UClass (name = ConstructorDelegateKt)
|
||||
UMethod (name = createBase)
|
||||
UParameter (name = i)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UReturnExpression
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1))
|
||||
UIdentifier (Identifier (BaseImpl))
|
||||
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = BaseImpl)
|
||||
USimpleNameReferenceExpression (identifier = i)
|
||||
UClass (name = Base)
|
||||
UMethod (name = print)
|
||||
UClass (name = BaseImpl)
|
||||
UField (name = x)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UMethod (name = print)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||
UIdentifier (Identifier (print))
|
||||
USimpleNameReferenceExpression (identifier = print, resolvesTo = null)
|
||||
USimpleNameReferenceExpression (identifier = x)
|
||||
UMethod (name = getX)
|
||||
UMethod (name = BaseImpl)
|
||||
UParameter (name = x)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UClass (name = Derived)
|
||||
UExpressionList (super_delegation)
|
||||
UTypeReferenceExpression (name = Base)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||
UIdentifier (Identifier (createBase))
|
||||
USimpleNameReferenceExpression (identifier = createBase, resolvesTo = null)
|
||||
ULiteralExpression (value = 10)
|
||||
UExpressionList (super_delegation)
|
||||
UTypeReferenceExpression (name = java.lang.CharSequence)
|
||||
ULiteralExpression (value = "abc")
|
||||
UMethod (name = Derived)
|
||||
UParameter (name = b)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UMethod (name = print)
|
||||
UMethod (name = getLength)
|
||||
UMethod (name = get)
|
||||
UParameter (name = index)
|
||||
UAnnotation (fqName = null)
|
||||
UMethod (name = subSequence)
|
||||
UParameter (name = startIndex)
|
||||
UAnnotation (fqName = null)
|
||||
UParameter (name = endIndex)
|
||||
UAnnotation (fqName = null)
|
||||
@@ -0,0 +1,26 @@
|
||||
public final class ConstructorDelegateKt {
|
||||
public static final fun createBase(@org.jetbrains.annotations.NotNull i: int) : Base {
|
||||
return <init>(i)
|
||||
}
|
||||
}
|
||||
|
||||
public abstract interface Base {
|
||||
public abstract fun print() : void = UastEmptyExpression
|
||||
}
|
||||
|
||||
public final class BaseImpl : Base {
|
||||
@org.jetbrains.annotations.NotNull private final var x: int
|
||||
public fun print() : void {
|
||||
print(x)
|
||||
}
|
||||
public final fun getX() : int = UastEmptyExpression
|
||||
public fun BaseImpl(@org.jetbrains.annotations.NotNull x: int) = UastEmptyExpression
|
||||
}
|
||||
|
||||
public final class Derived : Base, java.lang.CharSequence {
|
||||
public fun Derived(@org.jetbrains.annotations.NotNull b: Base) = UastEmptyExpression
|
||||
public fun print() : void = UastEmptyExpression
|
||||
public fun getLength() : int = UastEmptyExpression
|
||||
public fun get(@null index: int) : char = UastEmptyExpression
|
||||
public fun subSequence(@null startIndex: int, @null endIndex: int) : java.lang.CharSequence = UastEmptyExpression
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
UFile (package = )
|
||||
UClass (name = A)
|
||||
UField (name = str)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UMethod (name = getStr)
|
||||
UMethod (name = A)
|
||||
UParameter (name = str)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UMethod (name = A)
|
||||
UParameter (name = i)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1))
|
||||
UIdentifier (Identifier (this))
|
||||
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = A)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = i)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (toString))
|
||||
USimpleNameReferenceExpression (identifier = toString, resolvesTo = null)
|
||||
UClass (name = AWithInit)
|
||||
UField (name = str)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UMethod (name = getStr)
|
||||
UMethod (name = AWithInit)
|
||||
UParameter (name = str)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (println))
|
||||
USimpleNameReferenceExpression (identifier = println, resolvesTo = null)
|
||||
UMethod (name = AWithInit)
|
||||
UParameter (name = i)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1))
|
||||
UIdentifier (Identifier (this))
|
||||
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = AWithInit)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = i)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (toString))
|
||||
USimpleNameReferenceExpression (identifier = toString, resolvesTo = null)
|
||||
UClass (name = AWith2Init)
|
||||
UField (name = str)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UMethod (name = getStr)
|
||||
UMethod (name = AWith2Init)
|
||||
UParameter (name = str)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||
UIdentifier (Identifier (println))
|
||||
USimpleNameReferenceExpression (identifier = println, resolvesTo = null)
|
||||
ULiteralExpression (value = 1)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||
UIdentifier (Identifier (println))
|
||||
USimpleNameReferenceExpression (identifier = println, resolvesTo = null)
|
||||
ULiteralExpression (value = 2)
|
||||
UMethod (name = AWith2Init)
|
||||
UParameter (name = i)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1))
|
||||
UIdentifier (Identifier (this))
|
||||
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = AWith2Init)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = i)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (toString))
|
||||
USimpleNameReferenceExpression (identifier = toString, resolvesTo = null)
|
||||
UClass (name = AOnlyInit)
|
||||
UMethod (name = AOnlyInit)
|
||||
UBlockExpression
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||
UIdentifier (Identifier (println))
|
||||
USimpleNameReferenceExpression (identifier = println, resolvesTo = null)
|
||||
ULiteralExpression (value = 1)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||
UIdentifier (Identifier (println))
|
||||
USimpleNameReferenceExpression (identifier = println, resolvesTo = null)
|
||||
ULiteralExpression (value = 2)
|
||||
UClass (name = AWithSecondary)
|
||||
UField (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UMethod (name = getA)
|
||||
UMethod (name = setA)
|
||||
UParameter (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UMethod (name = AWithSecondary)
|
||||
UParameter (name = i)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))
|
||||
UIdentifier (Identifier ())
|
||||
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = Object)
|
||||
UBinaryExpression (operator = =)
|
||||
USimpleNameReferenceExpression (identifier = a)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = i)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (toString))
|
||||
USimpleNameReferenceExpression (identifier = toString, resolvesTo = null)
|
||||
UMethod (name = AWithSecondary)
|
||||
UParameter (name = s)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))
|
||||
UIdentifier (Identifier ())
|
||||
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = Object)
|
||||
UBinaryExpression (operator = =)
|
||||
USimpleNameReferenceExpression (identifier = a)
|
||||
USimpleNameReferenceExpression (identifier = s)
|
||||
UClass (name = AWithSecondaryInit)
|
||||
UField (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UMethod (name = getA)
|
||||
UMethod (name = setA)
|
||||
UParameter (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UMethod (name = AWithSecondaryInit)
|
||||
UParameter (name = i)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))
|
||||
UIdentifier (Identifier ())
|
||||
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = Object)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (println))
|
||||
USimpleNameReferenceExpression (identifier = println, resolvesTo = null)
|
||||
UBinaryExpression (operator = =)
|
||||
USimpleNameReferenceExpression (identifier = a)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = i)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (toString))
|
||||
USimpleNameReferenceExpression (identifier = toString, resolvesTo = null)
|
||||
UMethod (name = AWithSecondaryInit)
|
||||
UParameter (name = s)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))
|
||||
UIdentifier (Identifier ())
|
||||
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = Object)
|
||||
UBinaryExpression (operator = =)
|
||||
USimpleNameReferenceExpression (identifier = a)
|
||||
USimpleNameReferenceExpression (identifier = s)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = local)
|
||||
USimpleNameReferenceExpression (identifier = s)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = local)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (toString))
|
||||
USimpleNameReferenceExpression (identifier = toString, resolvesTo = null)
|
||||
@@ -0,0 +1,81 @@
|
||||
public final class A {
|
||||
@org.jetbrains.annotations.NotNull private final var str: java.lang.String
|
||||
public final fun getStr() : java.lang.String = UastEmptyExpression
|
||||
public fun A(@org.jetbrains.annotations.NotNull str: java.lang.String) = UastEmptyExpression
|
||||
public fun A(@org.jetbrains.annotations.NotNull i: int) {
|
||||
<init>(i.toString())
|
||||
}
|
||||
}
|
||||
|
||||
public final class AWithInit {
|
||||
@org.jetbrains.annotations.NotNull private final var str: java.lang.String
|
||||
public final fun getStr() : java.lang.String = UastEmptyExpression
|
||||
public fun AWithInit(@org.jetbrains.annotations.NotNull str: java.lang.String) {
|
||||
{
|
||||
println()
|
||||
}
|
||||
}
|
||||
public fun AWithInit(@org.jetbrains.annotations.NotNull i: int) {
|
||||
<init>(i.toString())
|
||||
}
|
||||
}
|
||||
|
||||
public final class AWith2Init {
|
||||
@org.jetbrains.annotations.NotNull private final var str: java.lang.String
|
||||
public final fun getStr() : java.lang.String = UastEmptyExpression
|
||||
public fun AWith2Init(@org.jetbrains.annotations.NotNull str: java.lang.String) {
|
||||
{
|
||||
println(1)
|
||||
}
|
||||
{
|
||||
println(2)
|
||||
}
|
||||
}
|
||||
public fun AWith2Init(@org.jetbrains.annotations.NotNull i: int) {
|
||||
<init>(i.toString())
|
||||
}
|
||||
}
|
||||
|
||||
public final class AOnlyInit {
|
||||
public fun AOnlyInit() {
|
||||
{
|
||||
println(1)
|
||||
}
|
||||
{
|
||||
println(2)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final class AWithSecondary {
|
||||
@org.jetbrains.annotations.NotNull public var a: java.lang.String
|
||||
public final fun getA() : java.lang.String = UastEmptyExpression
|
||||
public final fun setA(@org.jetbrains.annotations.NotNull a: java.lang.String) : void = UastEmptyExpression
|
||||
public fun AWithSecondary(@org.jetbrains.annotations.NotNull i: int) {
|
||||
<init>()
|
||||
a = i.toString()
|
||||
}
|
||||
public fun AWithSecondary(@org.jetbrains.annotations.NotNull s: java.lang.String) {
|
||||
<init>()
|
||||
a = s
|
||||
}
|
||||
}
|
||||
|
||||
public final class AWithSecondaryInit {
|
||||
@org.jetbrains.annotations.NotNull public var a: java.lang.String
|
||||
public final fun getA() : java.lang.String = UastEmptyExpression
|
||||
public final fun setA(@org.jetbrains.annotations.NotNull a: java.lang.String) : void = UastEmptyExpression
|
||||
public fun AWithSecondaryInit(@org.jetbrains.annotations.NotNull i: int) {
|
||||
<init>()
|
||||
{
|
||||
println()
|
||||
}
|
||||
a = i.toString()
|
||||
}
|
||||
public fun AWithSecondaryInit(@org.jetbrains.annotations.NotNull s: java.lang.String) {
|
||||
<init>()
|
||||
a = s
|
||||
var local: java.lang.String = s
|
||||
local.toString()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
UFile (package = )
|
||||
UClass (name = DestructuringDeclarationKt)
|
||||
UMethod (name = foo)
|
||||
UParameter (name = data)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = var268d41a5)
|
||||
UAnnotation (fqName = null)
|
||||
UBinaryExpression (operator = <other>)
|
||||
ULiteralExpression (value = "foo")
|
||||
ULiteralExpression (value = 1)
|
||||
ULocalVariable (name = a)
|
||||
UAnnotation (fqName = null)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = var268d41a5)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (component1))
|
||||
USimpleNameReferenceExpression (identifier = <ERROR FUNCTION>, resolvesTo = null)
|
||||
ULocalVariable (name = b)
|
||||
UAnnotation (fqName = null)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = var268d41a5)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (component2))
|
||||
USimpleNameReferenceExpression (identifier = <ERROR FUNCTION>, resolvesTo = null)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = var465978a0)
|
||||
UAnnotation (fqName = null)
|
||||
UAnnotation (fqName = kotlin.Suppress)
|
||||
UNamedExpression (name = names)
|
||||
ULiteralExpression (value = "UNCHECKED_CAST")
|
||||
UBinaryExpressionWithType
|
||||
USimpleNameReferenceExpression (identifier = data)
|
||||
UTypeReferenceExpression (name = kotlin.Pair<? extends java.lang.String,? extends java.lang.String>)
|
||||
ULocalVariable (name = k)
|
||||
UAnnotation (fqName = null)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = var465978a0)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (component1))
|
||||
USimpleNameReferenceExpression (identifier = <ERROR FUNCTION>, resolvesTo = null)
|
||||
ULocalVariable (name = v)
|
||||
UAnnotation (fqName = null)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = var465978a0)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (component2))
|
||||
USimpleNameReferenceExpression (identifier = <ERROR FUNCTION>, resolvesTo = null)
|
||||
@@ -0,0 +1,10 @@
|
||||
public final class DestructuringDeclarationKt {
|
||||
public static final fun foo(@org.jetbrains.annotations.NotNull data: java.lang.Object) : void {
|
||||
@null var var268d41a5: <ErrorType> = "foo" <other> 1
|
||||
@null var a: java.lang.String = var268d41a5.<ERROR FUNCTION>()
|
||||
@null var b: int = var268d41a5.<ERROR FUNCTION>()
|
||||
@null @kotlin.Suppress(names = "UNCHECKED_CAST") var var465978a0: <ErrorType> = data as kotlin.Pair<? extends java.lang.String,? extends java.lang.String>
|
||||
@null var k: java.lang.String = var465978a0.<ERROR FUNCTION>()
|
||||
@null var v: java.lang.String = var465978a0.<ERROR FUNCTION>()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
UFile (package = )
|
||||
UClass (name = Style)
|
||||
UField (name = value)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UEnumConstant (name = SHEET)
|
||||
UAnnotation (fqName = null)
|
||||
USimpleNameReferenceExpression (identifier = Style)
|
||||
ULiteralExpression (value = "foo")
|
||||
UClass (name = SHEET)
|
||||
UMethod (name = getExitAnimation)
|
||||
UBlockExpression
|
||||
UReturnExpression
|
||||
ULiteralExpression (value = "bar")
|
||||
UMethod (name = SHEET)
|
||||
UMethod (name = getExitAnimation)
|
||||
UMethod (name = getValue)
|
||||
UMethod (name = Style)
|
||||
UParameter (name = value)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
@@ -0,0 +1,12 @@
|
||||
public enum Style {
|
||||
@org.jetbrains.annotations.NotNull private final var value: java.lang.String
|
||||
@null SHEET("foo") {
|
||||
public fun getExitAnimation() : java.lang.String {
|
||||
return "bar"
|
||||
}
|
||||
fun SHEET() = UastEmptyExpression
|
||||
}
|
||||
public abstract fun getExitAnimation() : java.lang.String = UastEmptyExpression
|
||||
public final fun getValue() : java.lang.String = UastEmptyExpression
|
||||
private fun Style(@org.jetbrains.annotations.NotNull value: java.lang.String) = UastEmptyExpression
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
UFile (package = org.jetbrains.uast.kotlin)
|
||||
UClass (name = LambdaReturnKt)
|
||||
UMethod (name = foo)
|
||||
UBlockExpression
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = lam1)
|
||||
ULambdaExpression
|
||||
UParameter (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = b)
|
||||
ULiteralExpression (value = 1)
|
||||
UReturnExpression
|
||||
UBinaryExpression (operator = +)
|
||||
USimpleNameReferenceExpression (identifier = a)
|
||||
USimpleNameReferenceExpression (identifier = b)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = lam2)
|
||||
ULambdaExpression
|
||||
UParameter (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = c)
|
||||
ULiteralExpression (value = 1)
|
||||
UReturnExpression
|
||||
UIfExpression
|
||||
UBinaryExpression (operator = >)
|
||||
USimpleNameReferenceExpression (identifier = a)
|
||||
ULiteralExpression (value = 0)
|
||||
UBinaryExpression (operator = +)
|
||||
USimpleNameReferenceExpression (identifier = a)
|
||||
USimpleNameReferenceExpression (identifier = c)
|
||||
UBinaryExpression (operator = -)
|
||||
USimpleNameReferenceExpression (identifier = a)
|
||||
USimpleNameReferenceExpression (identifier = c)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = lam3)
|
||||
ULabeledExpression (label = lbd)
|
||||
ULambdaExpression
|
||||
UParameter (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = d)
|
||||
ULiteralExpression (value = 1)
|
||||
UReturnExpression
|
||||
UBinaryExpression (operator = +)
|
||||
USimpleNameReferenceExpression (identifier = a)
|
||||
USimpleNameReferenceExpression (identifier = d)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = lam4)
|
||||
ULambdaExpression
|
||||
UParameter (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UIfExpression
|
||||
UBinaryExpression (operator = <)
|
||||
USimpleNameReferenceExpression (identifier = a)
|
||||
ULiteralExpression (value = 5)
|
||||
UReturnExpression
|
||||
ULiteralExpression (value = "5")
|
||||
UIfExpression
|
||||
UBinaryExpression (operator = >)
|
||||
USimpleNameReferenceExpression (identifier = a)
|
||||
ULiteralExpression (value = 0)
|
||||
UReturnExpression
|
||||
ULiteralExpression (value = "1")
|
||||
UReturnExpression
|
||||
ULiteralExpression (value = "2")
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = lam5)
|
||||
ULambdaExpression
|
||||
UParameter (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UReturnExpression
|
||||
UBinaryExpression (operator = +)
|
||||
ULiteralExpression (value = "a")
|
||||
USimpleNameReferenceExpression (identifier = a)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||
UIdentifier (Identifier (bar))
|
||||
USimpleNameReferenceExpression (identifier = bar, resolvesTo = null)
|
||||
ULambdaExpression
|
||||
UBlockExpression
|
||||
UIfExpression
|
||||
UBinaryExpression (operator = >)
|
||||
USimpleNameReferenceExpression (identifier = it)
|
||||
ULiteralExpression (value = 5)
|
||||
UReturnExpression
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = b)
|
||||
ULiteralExpression (value = 1)
|
||||
UReturnExpression
|
||||
UBinaryExpression (operator = +)
|
||||
USimpleNameReferenceExpression (identifier = it)
|
||||
USimpleNameReferenceExpression (identifier = b)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = x)
|
||||
ULambdaExpression
|
||||
UBlockExpression
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = vardbcd0724)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2))
|
||||
UIdentifier (Identifier (listOf))
|
||||
USimpleNameReferenceExpression (identifier = listOf, resolvesTo = null)
|
||||
ULiteralExpression (value = 1)
|
||||
ULiteralExpression (value = 2)
|
||||
ULocalVariable (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = vardbcd0724)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (component1))
|
||||
USimpleNameReferenceExpression (identifier = <ERROR FUNCTION>, resolvesTo = null)
|
||||
ULocalVariable (name = b)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = vardbcd0724)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (component2))
|
||||
USimpleNameReferenceExpression (identifier = <ERROR FUNCTION>, resolvesTo = null)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = y)
|
||||
ULambdaExpression
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||
UIdentifier (Identifier (listOf))
|
||||
USimpleNameReferenceExpression (identifier = listOf, resolvesTo = null)
|
||||
ULiteralExpression (value = 1)
|
||||
UMethod (name = bar)
|
||||
UParameter (name = lmbd)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||
UIdentifier (Identifier (lmbd))
|
||||
USimpleNameReferenceExpression (identifier = invoke, resolvesTo = null)
|
||||
ULiteralExpression (value = 1)
|
||||
@@ -0,0 +1,44 @@
|
||||
package org.jetbrains.uast.kotlin
|
||||
|
||||
public final class LambdaReturnKt {
|
||||
public static final fun foo() : void {
|
||||
var lam1: kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.Integer> = { @org.jetbrains.annotations.NotNull var a: int ->
|
||||
|
||||
var b: int = 1
|
||||
return a + b
|
||||
}
|
||||
var lam2: kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.Integer> = { @org.jetbrains.annotations.NotNull var a: int ->
|
||||
|
||||
var c: int = 1
|
||||
return if (a > 0) a + c else a - c
|
||||
}
|
||||
var lam3: kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.Integer> = lbd@ { @org.jetbrains.annotations.NotNull var a: int ->
|
||||
|
||||
var d: int = 1
|
||||
return a + d
|
||||
}
|
||||
var lam4: kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.String> = fun (@org.jetbrains.annotations.NotNull var a: int) {
|
||||
if (a < 5) return "5"
|
||||
if (a > 0) return "1" else return "2"
|
||||
}
|
||||
var lam5: kotlin.jvm.functions.Function1<? super java.lang.Integer,? extends java.lang.String> = fun (@org.jetbrains.annotations.NotNull var a: int) {
|
||||
return "a" + a
|
||||
}
|
||||
bar({
|
||||
if (it > 5) return
|
||||
var b: int = 1
|
||||
return it + b
|
||||
})
|
||||
var x: kotlin.jvm.functions.Function0<? extends kotlin.Unit> = {
|
||||
@org.jetbrains.annotations.NotNull var vardbcd0724: <ErrorType> = listOf(1, 2)
|
||||
@org.jetbrains.annotations.NotNull var a: int = vardbcd0724.<ERROR FUNCTION>()
|
||||
@org.jetbrains.annotations.NotNull var b: int = vardbcd0724.<ERROR FUNCTION>()
|
||||
}
|
||||
var y: kotlin.jvm.functions.Function0<? extends kotlin.Unit> = {
|
||||
listOf(1)
|
||||
}
|
||||
}
|
||||
private static final fun bar(@org.jetbrains.annotations.NotNull lmbd: kotlin.jvm.functions.Function1<? super java.lang.Integer,java.lang.Integer>) : void {
|
||||
invoke(1)
|
||||
}
|
||||
}
|
||||
@@ -33,8 +33,6 @@
|
||||
[1]:[USimpleNameReferenceExpression (identifier = String)]
|
||||
[1]:[UIdentifier (Identifier (String))]
|
||||
[1]:[ULiteralExpression (value = 42)]
|
||||
[1]:[UClass (name = LocalObject)]
|
||||
[1]:[UIdentifier (Identifier (LocalObject))]
|
||||
[1]:[UReturnExpression]
|
||||
[1]:[UBinaryExpression (operator = ==)]
|
||||
[1]:[UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))]
|
||||
|
||||
@@ -9,7 +9,6 @@ Boolean -> USimpleNameReferenceExpression (identifier = Boolean)
|
||||
someLocalFun -> ULambdaExpression
|
||||
text -> [!] UnknownKotlinExpression (VALUE_PARAMETER)
|
||||
String -> USimpleNameReferenceExpression (identifier = String)
|
||||
LocalObject -> UClass (name = LocalObject)
|
||||
bar -> UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
== -> USimpleNameReferenceExpression (identifier = ==)
|
||||
Local -> UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))
|
||||
|
||||
@@ -8,7 +8,5 @@ fun foo(): Boolean {
|
||||
|
||||
fun Int.someLocalFun(text: String) = 42
|
||||
|
||||
object LocalObject
|
||||
|
||||
return bar() == Local()
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
UFile (package = )
|
||||
UClass (name = LocalDeclarationsKt)
|
||||
UMethod (name = foo)
|
||||
UBlockExpression
|
||||
UDeclarationsExpression
|
||||
UClass (name = Local)
|
||||
UMethod (name = Local)
|
||||
UDeclarationsExpression
|
||||
UVariable (name = bar)
|
||||
ULambdaExpression
|
||||
UBlockExpression
|
||||
UReturnExpression
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))
|
||||
UIdentifier (Identifier (Local))
|
||||
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = Local)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = baz)
|
||||
ULambdaExpression
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))
|
||||
UIdentifier (Identifier (Local))
|
||||
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = Local)
|
||||
UDeclarationsExpression
|
||||
UVariable (name = someLocalFun)
|
||||
ULambdaExpression
|
||||
UParameter (name = text)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UReturnExpression
|
||||
ULiteralExpression (value = 42)
|
||||
UReturnExpression
|
||||
UBinaryExpression (operator = ==)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (bar))
|
||||
USimpleNameReferenceExpression (identifier = bar, resolvesTo = null)
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))
|
||||
UIdentifier (Identifier (Local))
|
||||
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = Local)
|
||||
@@ -28,11 +28,6 @@ UFile (package = )
|
||||
UBlockExpression
|
||||
UReturnExpression
|
||||
ULiteralExpression (value = 42)
|
||||
UDeclarationsExpression
|
||||
UClass (name = LocalObject)
|
||||
UField (name = INSTANCE)
|
||||
UAnnotation (fqName = null)
|
||||
UMethod (name = LocalDeclarationsKt$foo$LocalObject)
|
||||
UReturnExpression
|
||||
UBinaryExpression (operator = ==)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
public final class LocalDeclarationsKt {
|
||||
public static final fun foo() : boolean {
|
||||
public static final class Local {
|
||||
public fun Local() = UastEmptyExpression
|
||||
}
|
||||
var bar: <ErrorType> = fun () {
|
||||
return <init>()
|
||||
}
|
||||
var baz: kotlin.jvm.functions.Function0<? extends kotlin.Unit> = fun () {
|
||||
<init>()
|
||||
}
|
||||
var someLocalFun: kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.String,? extends java.lang.Integer> = fun (@org.jetbrains.annotations.NotNull var text: java.lang.String) {
|
||||
return 42
|
||||
}
|
||||
return bar() == <init>()
|
||||
}
|
||||
}
|
||||
@@ -12,10 +12,6 @@ public final class LocalDeclarationsKt {
|
||||
var someLocalFun: kotlin.jvm.functions.Function2<? super java.lang.Integer,? super java.lang.String,? extends java.lang.Integer> = fun (@org.jetbrains.annotations.NotNull var text: java.lang.String) {
|
||||
return 42
|
||||
}
|
||||
public static final class LocalObject {
|
||||
@null public static final var INSTANCE: LocalDeclarationsKt.foo.LocalObject
|
||||
private fun LocalDeclarationsKt$foo$LocalObject() = UastEmptyExpression
|
||||
}
|
||||
return bar() == <init>()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,11 +28,6 @@ UFile (package = ) [public final class LocalDeclarationsKt {...]
|
||||
UBlockExpression [{...}]
|
||||
UReturnExpression [return 42]
|
||||
ULiteralExpression (value = 42) [42] : PsiType:int
|
||||
UDeclarationsExpression [public static final class LocalObject {...}]
|
||||
UClass (name = LocalObject) [public static final class LocalObject {...}]
|
||||
UField (name = INSTANCE) [@null public static final var INSTANCE: LocalDeclarationsKt.foo.LocalObject]
|
||||
UAnnotation (fqName = null) [@null]
|
||||
UMethod (name = LocalDeclarationsKt$foo$LocalObject) [private fun LocalDeclarationsKt$foo$LocalObject() = UastEmptyExpression]
|
||||
UReturnExpression [return bar() == <init>()] : PsiType:Void
|
||||
UBinaryExpression (operator = ==) [bar() == <init>()] : PsiType:boolean
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) [bar()] : PsiType:<ErrorType>
|
||||
|
||||
@@ -28,11 +28,6 @@ UFile (package = ) [public final class LocalDeclarationsKt {...]
|
||||
UBlockExpression [{...}] = Nothing
|
||||
UReturnExpression [return 42] = Undetermined
|
||||
ULiteralExpression (value = 42) [42] = 42
|
||||
UDeclarationsExpression [public static final class LocalObject {...}] = Undetermined
|
||||
UClass (name = LocalObject) [public static final class LocalObject {...}]
|
||||
UField (name = INSTANCE) [@null public static final var INSTANCE: LocalDeclarationsKt.foo.LocalObject]
|
||||
UAnnotation (fqName = null) [@null]
|
||||
UMethod (name = LocalDeclarationsKt$foo$LocalObject) [private fun LocalDeclarationsKt$foo$LocalObject() = UastEmptyExpression]
|
||||
UReturnExpression [return bar() == <init>()] = Nothing
|
||||
UBinaryExpression (operator = ==) [bar() == <init>()] = Undetermined
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) [bar()] = external bar()()
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
UFile (package = )
|
||||
UClass (name = MyAnnotation)
|
||||
UClass (name = MyAnnotation2)
|
||||
UClass (name = MyAnnotation3)
|
||||
UClass (name = MyAnnotation4)
|
||||
UClass (name = MyAnnotation5)
|
||||
UClass (name = Test1)
|
||||
UField (name = bar)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UMethod (name = getBar)
|
||||
UMethod (name = setBar)
|
||||
UParameter (name = bar)
|
||||
UAnnotation (fqName = null)
|
||||
UMethod (name = Test1)
|
||||
UParameter (name = bar)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UAnnotation (fqName = MyAnnotation)
|
||||
UClass (name = Test2)
|
||||
UField (name = bar)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UAnnotation (fqName = MyAnnotation5)
|
||||
UMethod (name = getBar)
|
||||
UAnnotation (fqName = MyAnnotation)
|
||||
UMethod (name = setBar)
|
||||
UAnnotation (fqName = MyAnnotation2)
|
||||
UParameter (name = bar)
|
||||
UAnnotation (fqName = MyAnnotation3)
|
||||
UAnnotation (fqName = null)
|
||||
UMethod (name = Test2)
|
||||
UParameter (name = bar)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
@@ -0,0 +1,30 @@
|
||||
public abstract annotation MyAnnotation {
|
||||
}
|
||||
|
||||
public abstract annotation MyAnnotation2 {
|
||||
}
|
||||
|
||||
public abstract annotation MyAnnotation3 {
|
||||
}
|
||||
|
||||
public abstract annotation MyAnnotation4 {
|
||||
}
|
||||
|
||||
public abstract annotation MyAnnotation5 {
|
||||
}
|
||||
|
||||
public final class Test1 {
|
||||
@org.jetbrains.annotations.NotNull private var bar: int
|
||||
public final fun getBar() : int = UastEmptyExpression
|
||||
public final fun setBar(@null bar: int) : void = UastEmptyExpression
|
||||
public fun Test1(@org.jetbrains.annotations.NotNull @MyAnnotation bar: int) = UastEmptyExpression
|
||||
}
|
||||
|
||||
public final class Test2 {
|
||||
@org.jetbrains.annotations.NotNull @MyAnnotation5 private var bar: int
|
||||
@MyAnnotation
|
||||
public final fun getBar() : int = UastEmptyExpression
|
||||
@MyAnnotation2
|
||||
public final fun setBar(@MyAnnotation3 @null bar: int) : void = UastEmptyExpression
|
||||
public fun Test2(@org.jetbrains.annotations.NotNull bar: int) = UastEmptyExpression
|
||||
}
|
||||
+1
-1
@@ -31,5 +31,5 @@ open class Parent(a: String, b: Int)
|
||||
|
||||
fun objectLiteral() {
|
||||
|
||||
object : Parent(b = 1, a = "foo")
|
||||
object : Parent(b = 1, a = "foo") { }
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
UFile (package = )
|
||||
UClass (name = ParametersDisorderKt)
|
||||
UMethod (name = global)
|
||||
UParameter (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UParameter (name = b)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UMethod (name = withDefault)
|
||||
UParameter (name = c)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
ULiteralExpression (value = 1)
|
||||
UParameter (name = d)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
ULiteralExpression (value = "aaa")
|
||||
UBlockExpression
|
||||
UMethod (name = withReceiver)
|
||||
UParameter (name = $this$withReceiver)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UParameter (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UParameter (name = b)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UMethod (name = call)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2))
|
||||
UIdentifier (Identifier (global))
|
||||
USimpleNameReferenceExpression (identifier = global, resolvesTo = null)
|
||||
ULiteralExpression (value = 2.2)
|
||||
ULiteralExpression (value = 2)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||
UIdentifier (Identifier (withDefault))
|
||||
USimpleNameReferenceExpression (identifier = withDefault, resolvesTo = null)
|
||||
ULiteralExpression (value = "bbb")
|
||||
UQualifiedReferenceExpression
|
||||
ULiteralExpression (value = "abc")
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2))
|
||||
UIdentifier (Identifier (withReceiver))
|
||||
USimpleNameReferenceExpression (identifier = withReceiver, resolvesTo = null)
|
||||
ULiteralExpression (value = 1)
|
||||
ULiteralExpression (value = 1.2)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = Math)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2))
|
||||
UIdentifier (Identifier (atan2))
|
||||
USimpleNameReferenceExpression (identifier = atan2, resolvesTo = null)
|
||||
ULiteralExpression (value = 1.3)
|
||||
ULiteralExpression (value = 3.4)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2))
|
||||
UIdentifier (Identifier (unresolvedMethod))
|
||||
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null)
|
||||
ULiteralExpression (value = "param1")
|
||||
ULiteralExpression (value = "param2")
|
||||
UQualifiedReferenceExpression
|
||||
UQualifiedReferenceExpression
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = java)
|
||||
USimpleNameReferenceExpression (identifier = lang)
|
||||
USimpleNameReferenceExpression (identifier = String)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 4))
|
||||
UIdentifier (Identifier (format))
|
||||
USimpleNameReferenceExpression (identifier = format, resolvesTo = null)
|
||||
ULiteralExpression (value = "%i %i %i")
|
||||
ULiteralExpression (value = 1)
|
||||
ULiteralExpression (value = 2)
|
||||
ULiteralExpression (value = 3)
|
||||
UQualifiedReferenceExpression
|
||||
UQualifiedReferenceExpression
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = java)
|
||||
USimpleNameReferenceExpression (identifier = lang)
|
||||
USimpleNameReferenceExpression (identifier = String)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2))
|
||||
UIdentifier (Identifier (format))
|
||||
USimpleNameReferenceExpression (identifier = format, resolvesTo = null)
|
||||
ULiteralExpression (value = "%i %i %i")
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 3))
|
||||
UIdentifier (Identifier (arrayOf))
|
||||
USimpleNameReferenceExpression (identifier = arrayOf, resolvesTo = null)
|
||||
ULiteralExpression (value = 1)
|
||||
ULiteralExpression (value = 2)
|
||||
ULiteralExpression (value = 3)
|
||||
UQualifiedReferenceExpression
|
||||
UQualifiedReferenceExpression
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = java)
|
||||
USimpleNameReferenceExpression (identifier = lang)
|
||||
USimpleNameReferenceExpression (identifier = String)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 3))
|
||||
UIdentifier (Identifier (format))
|
||||
USimpleNameReferenceExpression (identifier = format, resolvesTo = null)
|
||||
ULiteralExpression (value = "%i %i %i")
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 3))
|
||||
UIdentifier (Identifier (arrayOf))
|
||||
USimpleNameReferenceExpression (identifier = arrayOf, resolvesTo = null)
|
||||
ULiteralExpression (value = 1)
|
||||
ULiteralExpression (value = 2)
|
||||
ULiteralExpression (value = 3)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 3))
|
||||
UIdentifier (Identifier (arrayOf))
|
||||
USimpleNameReferenceExpression (identifier = arrayOf, resolvesTo = null)
|
||||
ULiteralExpression (value = 4)
|
||||
ULiteralExpression (value = 5)
|
||||
ULiteralExpression (value = 6)
|
||||
UQualifiedReferenceExpression
|
||||
UQualifiedReferenceExpression
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = java)
|
||||
USimpleNameReferenceExpression (identifier = lang)
|
||||
USimpleNameReferenceExpression (identifier = String)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2))
|
||||
UIdentifier (Identifier (format))
|
||||
USimpleNameReferenceExpression (identifier = format, resolvesTo = null)
|
||||
ULiteralExpression (value = "%i %i %i")
|
||||
UQualifiedReferenceExpression
|
||||
UQualifiedReferenceExpression
|
||||
ULiteralExpression (value = "")
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||
UIdentifier (Identifier (chunked))
|
||||
USimpleNameReferenceExpression (identifier = chunked, resolvesTo = null)
|
||||
ULiteralExpression (value = 2)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (toTypedArray))
|
||||
USimpleNameReferenceExpression (identifier = toTypedArray, resolvesTo = null)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2))
|
||||
UIdentifier (Identifier (with))
|
||||
USimpleNameReferenceExpression (identifier = with, resolvesTo = null)
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))
|
||||
UIdentifier (Identifier (A))
|
||||
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = A)
|
||||
ULambdaExpression
|
||||
UBlockExpression
|
||||
UQualifiedReferenceExpression
|
||||
ULiteralExpression (value = "def")
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2))
|
||||
UIdentifier (Identifier (with2Receivers))
|
||||
USimpleNameReferenceExpression (identifier = with2Receivers, resolvesTo = null)
|
||||
ULiteralExpression (value = 8)
|
||||
ULiteralExpression (value = 7.0)
|
||||
UMethod (name = objectLiteral)
|
||||
UBlockExpression
|
||||
UObjectLiteralExpression
|
||||
ULiteralExpression (value = 1)
|
||||
ULiteralExpression (value = "foo")
|
||||
UClass (name = null)
|
||||
UMethod (name = )
|
||||
UClass (name = A)
|
||||
UMethod (name = with2Receivers)
|
||||
UParameter (name = $this$with2Receivers)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UParameter (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UParameter (name = b)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UMethod (name = A)
|
||||
UClass (name = Parent)
|
||||
UMethod (name = Parent)
|
||||
UParameter (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UParameter (name = b)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
@@ -20,8 +20,7 @@ public final class ParametersDisorderKt {
|
||||
})
|
||||
}
|
||||
public static final fun objectLiteral() : void {
|
||||
anonymous object : Parent(b = 1, a = "foo")
|
||||
|
||||
anonymous object : Parent(b = 1, a = "foo") { }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
UFile (package = )
|
||||
UClass (name = TestPropertyInitializer)
|
||||
UMethod (name = getWithSetter)
|
||||
UBlockExpression
|
||||
UReturnExpression
|
||||
USimpleNameReferenceExpression (identifier = field)
|
||||
UMethod (name = setWithSetter)
|
||||
UParameter (name = p)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UBinaryExpression (operator = =)
|
||||
USimpleNameReferenceExpression (identifier = field)
|
||||
USimpleNameReferenceExpression (identifier = p)
|
||||
UMethod (name = TestPropertyInitializer)
|
||||
@@ -0,0 +1,9 @@
|
||||
public final class TestPropertyInitializer {
|
||||
public final fun getWithSetter() : java.lang.String {
|
||||
return field
|
||||
}
|
||||
public final fun setWithSetter(@org.jetbrains.annotations.NotNull p: java.lang.String) : void {
|
||||
field = p
|
||||
}
|
||||
public fun TestPropertyInitializer() = UastEmptyExpression
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
UFile (package = )
|
||||
UClass (name = PropertyInitializerWithoutSetterKt)
|
||||
UField (name = withoutSetter)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
ULiteralExpression (value = "/sdcard")
|
||||
UMethod (name = getWithoutSetter)
|
||||
UBlockExpression
|
||||
UReturnExpression
|
||||
USimpleNameReferenceExpression (identifier = field)
|
||||
UMethod (name = setWithoutSetter)
|
||||
UParameter (name = withoutSetter)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
@@ -0,0 +1,7 @@
|
||||
public final class PropertyInitializerWithoutSetterKt {
|
||||
@org.jetbrains.annotations.NotNull private static var withoutSetter: java.lang.String = "/sdcard"
|
||||
public static final fun getWithoutSetter() : java.lang.String {
|
||||
return field
|
||||
}
|
||||
public static final fun setWithoutSetter(@org.jetbrains.annotations.NotNull withoutSetter: java.lang.String) : void = UastEmptyExpression
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
UFile (package = )
|
||||
UClass (name = PropertyWithAnnotationKt)
|
||||
UField (name = prop1)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UAnnotation (fqName = TestAnnotation)
|
||||
ULiteralExpression (value = 0)
|
||||
UMethod (name = getProp1)
|
||||
UMethod (name = getProp2)
|
||||
UAnnotation (fqName = TestAnnotation)
|
||||
UBlockExpression
|
||||
UReturnExpression
|
||||
ULiteralExpression (value = 0)
|
||||
UMethod (name = getProp3)
|
||||
UBlockExpression
|
||||
UReturnExpression
|
||||
ULiteralExpression (value = 0)
|
||||
UMethod (name = setProp3)
|
||||
UAnnotation (fqName = TestAnnotation)
|
||||
UParameter (name = value)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UBinaryExpression (operator = =)
|
||||
USimpleNameReferenceExpression (identifier = field)
|
||||
USimpleNameReferenceExpression (identifier = value)
|
||||
UClass (name = TestAnnotation)
|
||||
@@ -0,0 +1,18 @@
|
||||
public final class PropertyWithAnnotationKt {
|
||||
@org.jetbrains.annotations.NotNull @TestAnnotation private static final var prop1: int = 0
|
||||
public static final fun getProp1() : int = UastEmptyExpression
|
||||
@TestAnnotation
|
||||
public static final fun getProp2() : int {
|
||||
return 0
|
||||
}
|
||||
public static final fun getProp3() : int {
|
||||
return 0
|
||||
}
|
||||
@TestAnnotation
|
||||
public static final fun setProp3(@org.jetbrains.annotations.NotNull value: int) : void {
|
||||
field = value
|
||||
}
|
||||
}
|
||||
|
||||
public abstract annotation TestAnnotation {
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
UFile (package = )
|
||||
UClass (name = SimpleScript)
|
||||
UMethod (name = getBarOrNull)
|
||||
UParameter (name = flag)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UReturnExpression
|
||||
UIfExpression
|
||||
USimpleNameReferenceExpression (identifier = flag)
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1))
|
||||
UIdentifier (Identifier (Bar))
|
||||
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = Bar)
|
||||
ULiteralExpression (value = 42)
|
||||
ULiteralExpression (value = null)
|
||||
UMethod (name = main)
|
||||
UParameter (name = strings)
|
||||
UAnnotation (fqName = null)
|
||||
UMethod (name = SimpleScript)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||
UIdentifier (Identifier (println))
|
||||
USimpleNameReferenceExpression (identifier = println, resolvesTo = null)
|
||||
ULiteralExpression (value = "Hello World!")
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||
UIdentifier (Identifier (getBarOrNull))
|
||||
USimpleNameReferenceExpression (identifier = getBarOrNull, resolvesTo = null)
|
||||
ULiteralExpression (value = true)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||
UIdentifier (Identifier (println))
|
||||
USimpleNameReferenceExpression (identifier = println, resolvesTo = null)
|
||||
ULiteralExpression (value = "Goodbye World!")
|
||||
UClass (name = Bar)
|
||||
UField (name = b)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
ULiteralExpression (value = 0)
|
||||
UField (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UMethod (name = getB)
|
||||
UMethod (name = getAPlusB)
|
||||
UBlockExpression
|
||||
UReturnExpression
|
||||
UBinaryExpression (operator = +)
|
||||
USimpleNameReferenceExpression (identifier = a)
|
||||
USimpleNameReferenceExpression (identifier = b)
|
||||
UMethod (name = getA)
|
||||
UMethod (name = Bar)
|
||||
UParameter (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UClass (name = Baz)
|
||||
UMethod (name = doSomething)
|
||||
UBlockExpression
|
||||
UMethod (name = Baz)
|
||||
@@ -0,0 +1,26 @@
|
||||
public class SimpleScript {
|
||||
public final fun getBarOrNull(@org.jetbrains.annotations.NotNull flag: boolean) : SimpleScript.Bar {
|
||||
return if (flag) <init>(42) else null
|
||||
}
|
||||
public static final fun main(@null strings: java.lang.String[]) : void = UastEmptyExpression
|
||||
public fun SimpleScript() {
|
||||
println("Hello World!")
|
||||
getBarOrNull(true)
|
||||
println("Goodbye World!")
|
||||
}
|
||||
public static final class Bar {
|
||||
@org.jetbrains.annotations.NotNull private final var b: int = 0
|
||||
@org.jetbrains.annotations.NotNull private final var a: int
|
||||
public final fun getB() : int = UastEmptyExpression
|
||||
public final fun getAPlusB() : int {
|
||||
return a + b
|
||||
}
|
||||
public final fun getA() : int = UastEmptyExpression
|
||||
public fun Bar(@org.jetbrains.annotations.NotNull a: int) = UastEmptyExpression
|
||||
public static final class Baz {
|
||||
public final fun doSomething() : void {
|
||||
}
|
||||
public fun Baz() = UastEmptyExpression
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,8 +43,6 @@ bar -> UMethod (name = bar)
|
||||
cons -> UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||
object -> UClass (name = null)
|
||||
A -> UObjectLiteralExpression
|
||||
innerObject -> UClass (name = innerObject)
|
||||
A -> UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1))
|
||||
InnerClass -> UClass (name = InnerClass)
|
||||
A -> UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1))
|
||||
cons -> UMethod (name = cons)
|
||||
|
||||
+1
-3
@@ -24,11 +24,9 @@ object O : A("text")
|
||||
|
||||
val anon = object : A("textForAnon") {
|
||||
fun bar() {
|
||||
cons(object : A("inner literal"))
|
||||
cons(object : A("inner literal") { })
|
||||
}
|
||||
|
||||
object innerObject : A("inner object")
|
||||
|
||||
inner class InnerClass : A("inner class")
|
||||
}
|
||||
|
||||
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
UFile (package = )
|
||||
UClass (name = SuperCallsKt)
|
||||
UField (name = anon)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UObjectLiteralExpression
|
||||
ULiteralExpression (value = "textForAnon")
|
||||
UClass (name = null)
|
||||
UMethod (name = bar)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||
UIdentifier (Identifier (cons))
|
||||
USimpleNameReferenceExpression (identifier = cons, resolvesTo = null)
|
||||
UObjectLiteralExpression
|
||||
ULiteralExpression (value = "inner literal")
|
||||
UClass (name = null)
|
||||
UMethod (name = )
|
||||
UMethod (name = )
|
||||
UClass (name = InnerClass)
|
||||
UMethod (name = InnerClass)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1))
|
||||
UIdentifier (Identifier (A))
|
||||
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = A)
|
||||
ULiteralExpression (value = "inner class")
|
||||
UMethod (name = getAnon)
|
||||
UMethod (name = cons)
|
||||
UParameter (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UClass (name = A)
|
||||
UField (name = str)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UMethod (name = foo)
|
||||
UParameter (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UMethod (name = getStr)
|
||||
UMethod (name = A)
|
||||
UParameter (name = str)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UMethod (name = A)
|
||||
UParameter (name = i)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1))
|
||||
UIdentifier (Identifier (this))
|
||||
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = A)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = i)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (toString))
|
||||
USimpleNameReferenceExpression (identifier = toString, resolvesTo = null)
|
||||
UClass (name = B)
|
||||
UMethod (name = B)
|
||||
UParameter (name = param)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1))
|
||||
UIdentifier (Identifier (A))
|
||||
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = A)
|
||||
USimpleNameReferenceExpression (identifier = param)
|
||||
UClass (name = C)
|
||||
UMethod (name = foo)
|
||||
UParameter (name = a)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UQualifiedReferenceExpression
|
||||
USuperExpression (label = null)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||
UIdentifier (Identifier (foo))
|
||||
USimpleNameReferenceExpression (identifier = foo, resolvesTo = null)
|
||||
USimpleNameReferenceExpression (identifier = a)
|
||||
UMethod (name = C)
|
||||
UParameter (name = p)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1))
|
||||
UIdentifier (Identifier (super))
|
||||
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = A)
|
||||
USimpleNameReferenceExpression (identifier = p)
|
||||
UMethod (name = C)
|
||||
UParameter (name = i)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1))
|
||||
UIdentifier (Identifier (super))
|
||||
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = A)
|
||||
USimpleNameReferenceExpression (identifier = i)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (println))
|
||||
USimpleNameReferenceExpression (identifier = println, resolvesTo = null)
|
||||
UClass (name = O)
|
||||
UField (name = INSTANCE)
|
||||
UAnnotation (fqName = null)
|
||||
UMethod (name = O)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1))
|
||||
UIdentifier (Identifier (A))
|
||||
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = A)
|
||||
ULiteralExpression (value = "text")
|
||||
@@ -15,15 +15,6 @@ UFile (package = )
|
||||
UClass (name = null)
|
||||
UMethod (name = SuperCallsKt$anon$1$bar$1)
|
||||
UMethod (name = SuperCallsKt$anon$1)
|
||||
UClass (name = innerObject)
|
||||
UField (name = INSTANCE)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UMethod (name = innerObject)
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1))
|
||||
UIdentifier (Identifier (A))
|
||||
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = A)
|
||||
ULiteralExpression (value = "inner object")
|
||||
UClass (name = InnerClass)
|
||||
UMethod (name = InnerClass)
|
||||
UBlockExpression
|
||||
|
||||
@@ -24,5 +24,4 @@ cons -> UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||
A -> USimpleNameReferenceExpression (identifier = A) from KtObjectLiteralExpression
|
||||
A -> UObjectLiteralExpression from KtNameReferenceExpression
|
||||
A -> UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1)) from KtNameReferenceExpression
|
||||
A -> UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1)) from KtNameReferenceExpression
|
||||
A -> USimpleNameReferenceExpression (identifier = A) from KtNameReferenceExpression
|
||||
|
||||
+1
-3
@@ -1,11 +1,9 @@
|
||||
public final class SuperCallsKt {
|
||||
@org.jetbrains.annotations.NotNull private static final var anon: A = anonymous object : A("textForAnon") {
|
||||
fun bar() {
|
||||
cons(object : A("inner literal"))
|
||||
cons(object : A("inner literal") { })
|
||||
}
|
||||
|
||||
object innerObject : A("inner object")
|
||||
|
||||
inner class InnerClass : A("inner class")
|
||||
}
|
||||
public static final fun getAnon() : A = UastEmptyExpression
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
UFile (package = test.pkg)
|
||||
UClass (name = SuspendKt)
|
||||
UMethod (name = top)
|
||||
UParameter (name = $completion)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UReturnExpression
|
||||
UQualifiedReferenceExpression
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))
|
||||
UIdentifier (Identifier (Context))
|
||||
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = Context)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (inner))
|
||||
USimpleNameReferenceExpression (identifier = inner, resolvesTo = null)
|
||||
UClass (name = Context)
|
||||
UMethod (name = inner)
|
||||
UParameter (name = $completion)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UReturnExpression
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (suspendPrivate))
|
||||
USimpleNameReferenceExpression (identifier = suspendPrivate, resolvesTo = null)
|
||||
UMethod (name = Context)
|
||||
UMethod (name = suspendPrivate)
|
||||
UBlockExpression
|
||||
UReturnExpression
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (inner))
|
||||
USimpleNameReferenceExpression (identifier = inner, resolvesTo = null)
|
||||
@@ -0,0 +1,17 @@
|
||||
package test.pkg
|
||||
|
||||
public final class SuspendKt {
|
||||
public static final fun top(@org.jetbrains.annotations.NotNull $completion: kotlin.coroutines.Continuation<? super java.lang.Integer>) : java.lang.Object {
|
||||
return <init>().inner()
|
||||
}
|
||||
}
|
||||
|
||||
public final class Context {
|
||||
public final fun inner(@org.jetbrains.annotations.NotNull $completion: kotlin.coroutines.Continuation<? super java.lang.Integer>) : java.lang.Object {
|
||||
return suspendPrivate()
|
||||
}
|
||||
public fun Context() = UastEmptyExpression
|
||||
fun suspendPrivate() : int {
|
||||
return inner()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
UFile (package = )
|
||||
UClass (name = Callback)
|
||||
UMethod (name = onError)
|
||||
UParameter (name = throwable)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UClass (name = Model)
|
||||
UMethod (name = crashMe)
|
||||
UParameter (name = clazz)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UParameter (name = factory)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UThrowExpression
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))
|
||||
UIdentifier (Identifier (UnsupportedOperationException))
|
||||
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = UnsupportedOperationException)
|
||||
UMethod (name = Model)
|
||||
UBlockExpression
|
||||
UBlockExpression
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2))
|
||||
UIdentifier (Identifier (crashMe))
|
||||
USimpleNameReferenceExpression (identifier = crashMe, resolvesTo = null)
|
||||
UQualifiedReferenceExpression
|
||||
UClassLiteralExpression
|
||||
USimpleNameReferenceExpression (identifier = java)
|
||||
ULambdaExpression
|
||||
UBlockExpression
|
||||
UReturnExpression
|
||||
UObjectLiteralExpression
|
||||
UClass (name = null)
|
||||
UMethod (name = onError)
|
||||
UParameter (name = throwable)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UThrowExpression
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1))
|
||||
UIdentifier (Identifier (UnsupportedOperationException))
|
||||
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = UnsupportedOperationException)
|
||||
ULiteralExpression (value = "")
|
||||
UMethod (name = )
|
||||
@@ -0,0 +1,45 @@
|
||||
UFile (package = )
|
||||
UClass (name = WhenAndDestructingKt)
|
||||
UMethod (name = getElementsAdditionalResolve)
|
||||
UParameter (name = string)
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||
UBlockExpression
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = arr)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2))
|
||||
UIdentifier (Identifier (listOf))
|
||||
USimpleNameReferenceExpression (identifier = listOf, resolvesTo = null)
|
||||
ULiteralExpression (value = "1")
|
||||
ULiteralExpression (value = "2")
|
||||
USwitchExpression
|
||||
USimpleNameReferenceExpression (identifier = string)
|
||||
UExpressionList (when)
|
||||
USwitchClauseExpressionWithBody
|
||||
ULiteralExpression (value = "aaaa")
|
||||
UExpressionList (when_entry)
|
||||
UReturnExpression
|
||||
ULiteralExpression (value = "bindingContext")
|
||||
UBreakExpression (label = null)
|
||||
USwitchClauseExpressionWithBody
|
||||
UExpressionList (when_entry)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = var837f1e82)
|
||||
UAnnotation (fqName = null)
|
||||
USimpleNameReferenceExpression (identifier = arr)
|
||||
ULocalVariable (name = bindingContext)
|
||||
UAnnotation (fqName = null)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = var837f1e82)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (component1))
|
||||
USimpleNameReferenceExpression (identifier = <ERROR FUNCTION>, resolvesTo = null)
|
||||
ULocalVariable (name = statementFilter)
|
||||
UAnnotation (fqName = null)
|
||||
UQualifiedReferenceExpression
|
||||
USimpleNameReferenceExpression (identifier = var837f1e82)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
UIdentifier (Identifier (component2))
|
||||
USimpleNameReferenceExpression (identifier = <ERROR FUNCTION>, resolvesTo = null)
|
||||
UReturnExpression
|
||||
USimpleNameReferenceExpression (identifier = bindingContext)
|
||||
UBreakExpression (label = null)
|
||||
@@ -0,0 +1,21 @@
|
||||
public final class WhenAndDestructingKt {
|
||||
public static final fun getElementsAdditionalResolve(@org.jetbrains.annotations.NotNull string: java.lang.String) : java.lang.String {
|
||||
var arr: java.util.List<? extends java.lang.String> = listOf("1", "2")
|
||||
switch (string) {
|
||||
"aaaa" -> {
|
||||
return "bindingContext"
|
||||
break
|
||||
}
|
||||
|
||||
-> {
|
||||
@null var var837f1e82: <ErrorType> = arr
|
||||
@null var bindingContext: java.lang.String = var837f1e82.<ERROR FUNCTION>()
|
||||
@null var statementFilter: java.lang.String = var837f1e82.<ERROR FUNCTION>()
|
||||
return bindingContext
|
||||
break
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user