FIR UAST: use uast-kotlin/testData for legecy tests
This commit is contained in:
committed by
Ilya Kirillov
parent
eac875b5d6
commit
03d4cb0dfa
@@ -200,7 +200,9 @@ import org.jetbrains.kotlinx.serialization.AbstractSerializationPluginBytecodeLi
|
|||||||
import org.jetbrains.kotlinx.serialization.AbstractSerializationPluginDiagnosticTest
|
import org.jetbrains.kotlinx.serialization.AbstractSerializationPluginDiagnosticTest
|
||||||
import org.jetbrains.kotlinx.serialization.idea.AbstractSerializationPluginIdeDiagnosticTest
|
import org.jetbrains.kotlinx.serialization.idea.AbstractSerializationPluginIdeDiagnosticTest
|
||||||
import org.jetbrains.kotlinx.serialization.idea.AbstractSerializationQuickFixTest
|
import org.jetbrains.kotlinx.serialization.idea.AbstractSerializationQuickFixTest
|
||||||
|
import org.jetbrains.uast.test.kotlin.AbstractFE1LegacyUastDeclarationTest
|
||||||
import org.jetbrains.uast.test.kotlin.AbstractFE1UastDeclarationTest
|
import org.jetbrains.uast.test.kotlin.AbstractFE1UastDeclarationTest
|
||||||
|
import org.jetbrains.uast.test.kotlin.AbstractFirLegacyUastDeclarationTest
|
||||||
import org.jetbrains.uast.test.kotlin.AbstractFirUastDeclarationTest
|
import org.jetbrains.uast.test.kotlin.AbstractFirUastDeclarationTest
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
@@ -1847,14 +1849,24 @@ fun main(args: Array<String>) {
|
|||||||
testGroup("plugins/uast-kotlin-fir/tests", "plugins/uast-kotlin-fir/testData") {
|
testGroup("plugins/uast-kotlin-fir/tests", "plugins/uast-kotlin-fir/testData") {
|
||||||
testClass<AbstractFirUastDeclarationTest> {
|
testClass<AbstractFirUastDeclarationTest> {
|
||||||
model("declaration")
|
model("declaration")
|
||||||
model("legacy")
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
testGroup("plugins/uast-kotlin-fir/tests", "plugins/uast-kotlin/testData") {
|
||||||
|
testClass<AbstractFirLegacyUastDeclarationTest> {
|
||||||
|
model("")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
testGroup("plugins/uast-kotlin-fir/tests", "plugins/uast-kotlin-fir/testData") {
|
testGroup("plugins/uast-kotlin-fir/tests", "plugins/uast-kotlin-fir/testData") {
|
||||||
testClass<AbstractFE1UastDeclarationTest> {
|
testClass<AbstractFE1UastDeclarationTest> {
|
||||||
model("declaration")
|
model("declaration")
|
||||||
model("legacy")
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
testGroup("plugins/uast-kotlin-fir/tests", "plugins/uast-kotlin/testData") {
|
||||||
|
testClass<AbstractFE1LegacyUastDeclarationTest> {
|
||||||
|
model("")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,74 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = AnnotatedExpressionsKt)
|
||||||
|
UMethod (name = foo)
|
||||||
|
UBlockExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UAnnotation (fqName = kotlin.Suppress)
|
||||||
|
UIdentifier (Identifier (foo))
|
||||||
|
USimpleNameReferenceExpression (identifier = foo, resolvesTo = null)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = a)
|
||||||
|
UAnnotation (fqName = kotlin.Suppress)
|
||||||
|
ULiteralExpression (value = 1)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = b)
|
||||||
|
UAnnotation (fqName = kotlin.Suppress)
|
||||||
|
ULiteralExpression (value = 2)
|
||||||
|
UBinaryExpression (operator = =)
|
||||||
|
UAnnotation (fqName = kotlin.Suppress)
|
||||||
|
USimpleNameReferenceExpression (identifier = b)
|
||||||
|
USimpleNameReferenceExpression (identifier = a)
|
||||||
|
UIfExpression
|
||||||
|
UAnnotation (fqName = kotlin.Suppress)
|
||||||
|
UBinaryExpression (operator = >)
|
||||||
|
USimpleNameReferenceExpression (identifier = a)
|
||||||
|
ULiteralExpression (value = 2)
|
||||||
|
USimpleNameReferenceExpression (identifier = a)
|
||||||
|
USimpleNameReferenceExpression (identifier = b)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = c)
|
||||||
|
UExpressionList (elvis)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = varae5075f4)
|
||||||
|
USimpleNameReferenceExpression (identifier = a)
|
||||||
|
UAnnotation (fqName = kotlin.Suppress)
|
||||||
|
UIfExpression
|
||||||
|
UBinaryExpression (operator = !=)
|
||||||
|
USimpleNameReferenceExpression (identifier = varae5075f4)
|
||||||
|
ULiteralExpression (value = null)
|
||||||
|
USimpleNameReferenceExpression (identifier = varae5075f4)
|
||||||
|
USimpleNameReferenceExpression (identifier = b)
|
||||||
|
UMethod (name = annotatedSwitch)
|
||||||
|
UParameter (name = str)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
USwitchExpression
|
||||||
|
UExpressionList (when)
|
||||||
|
USwitchClauseExpressionWithBody
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UAnnotation (fqName = kotlin.Suppress)
|
||||||
|
UNamedExpression (name = names)
|
||||||
|
ULiteralExpression (value = "DEPRECATION")
|
||||||
|
USimpleNameReferenceExpression (identifier = str)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (isBlank))
|
||||||
|
USimpleNameReferenceExpression (identifier = isBlank, resolvesTo = null)
|
||||||
|
UExpressionList (when_entry)
|
||||||
|
UYieldExpression
|
||||||
|
ULiteralExpression (value = null)
|
||||||
|
USwitchClauseExpressionWithBody
|
||||||
|
UBinaryExpression (operator = !=)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = str)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (isNotEmpty))
|
||||||
|
USimpleNameReferenceExpression (identifier = isNotEmpty, resolvesTo = null)
|
||||||
|
ULiteralExpression (value = null)
|
||||||
|
UExpressionList (when_entry)
|
||||||
|
UYieldExpression
|
||||||
|
ULiteralExpression (value = null)
|
||||||
|
USwitchClauseExpressionWithBody
|
||||||
|
UExpressionList (when_entry)
|
||||||
|
UYieldExpression
|
||||||
|
ULiteralExpression (value = 1)
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
public final class AnnotatedExpressionsKt {
|
||||||
|
public static final fun foo() : void {
|
||||||
|
foo()
|
||||||
|
@kotlin.Suppress var a: int = 1
|
||||||
|
@kotlin.Suppress var b: int = 2
|
||||||
|
b = a
|
||||||
|
if (a > 2) a else b
|
||||||
|
var c: int = elvis {
|
||||||
|
var varae5075f4: int = a
|
||||||
|
if (varae5075f4 != null) varae5075f4 else b
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static final fun annotatedSwitch(@org.jetbrains.annotations.NotNull str: java.lang.String) : java.lang.Integer {
|
||||||
|
return switch {
|
||||||
|
str.isBlank() -> {
|
||||||
|
yield null
|
||||||
|
}
|
||||||
|
|
||||||
|
str.isNotEmpty() != null -> {
|
||||||
|
yield null
|
||||||
|
}
|
||||||
|
|
||||||
|
-> {
|
||||||
|
yield 1
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = Annotation)
|
||||||
|
UAnnotationMethod (name = strings)
|
||||||
|
UClass (name = A)
|
||||||
|
UAnnotation (fqName = Annotation)
|
||||||
|
UMethod (name = A)
|
||||||
|
UClass (name = AnnotationInner)
|
||||||
|
UAnnotationMethod (name = value)
|
||||||
|
UClass (name = B1)
|
||||||
|
UAnnotation (fqName = AnnotationArray)
|
||||||
|
UNamedExpression (name = value)
|
||||||
|
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (Annotation))
|
||||||
|
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = PsiClass: Annotation)
|
||||||
|
UMethod (name = B1)
|
||||||
|
UClass (name = B2)
|
||||||
|
UAnnotation (fqName = AnnotationArray)
|
||||||
|
UNamedExpression (name = value)
|
||||||
|
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 2))
|
||||||
|
UIdentifier (Identifier (Annotation))
|
||||||
|
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = PsiClass: Annotation)
|
||||||
|
ULiteralExpression (value = "sv1")
|
||||||
|
ULiteralExpression (value = "sv2")
|
||||||
|
UMethod (name = B2)
|
||||||
|
UClass (name = AnnotationArray)
|
||||||
|
UAnnotationMethod (name = value)
|
||||||
|
UClass (name = C)
|
||||||
|
UAnnotation (fqName = AnnotationArray)
|
||||||
|
UNamedExpression (name = value)
|
||||||
|
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (Annotation))
|
||||||
|
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = PsiClass: Annotation)
|
||||||
|
UCallExpression (kind = UastCallKind(name='array_initializer'), argCount = 2))
|
||||||
|
UIdentifier (Identifier (arrayOf))
|
||||||
|
USimpleNameReferenceExpression (identifier = arrayOf, resolvesTo = null)
|
||||||
|
ULiteralExpression (value = "sar1")
|
||||||
|
ULiteralExpression (value = "sar2")
|
||||||
|
UMethod (name = C)
|
||||||
|
UClass (name = C2)
|
||||||
|
UAnnotation (fqName = AnnotationArray)
|
||||||
|
UNamedExpression (name = value)
|
||||||
|
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (Annotation))
|
||||||
|
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = PsiClass: Annotation)
|
||||||
|
UCallExpression (kind = UastCallKind(name='array_initializer'), argCount = 2))
|
||||||
|
UIdentifier (Identifier ([))
|
||||||
|
ULiteralExpression (value = "[sar]1")
|
||||||
|
ULiteralExpression (value = "[sar]2")
|
||||||
|
UMethod (name = C2)
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
public abstract annotation Annotation {
|
||||||
|
public abstract fun strings() : java.lang.String[] = UastEmptyExpression
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class A {
|
||||||
|
public fun A() = UastEmptyExpression
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract annotation AnnotationInner {
|
||||||
|
public abstract fun value() : Annotation = UastEmptyExpression
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class B1 {
|
||||||
|
public fun B1() = UastEmptyExpression
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class B2 {
|
||||||
|
public fun B2() = UastEmptyExpression
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract annotation AnnotationArray {
|
||||||
|
public abstract fun value() : Annotation[] = UastEmptyExpression
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class C {
|
||||||
|
public fun C() = UastEmptyExpression
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class C2 {
|
||||||
|
public fun C2() = UastEmptyExpression
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = AnnotationParametersKt)
|
||||||
|
UMethod (name = foo)
|
||||||
|
UAnnotation (fqName = RequiresPermission)
|
||||||
|
UNamedExpression (name = anyOf)
|
||||||
|
UCallExpression (kind = UastCallKind(name='array_initializer'), argCount = 3))
|
||||||
|
UIdentifier (Identifier (intArrayOf))
|
||||||
|
USimpleNameReferenceExpression (identifier = intArrayOf, resolvesTo = null)
|
||||||
|
ULiteralExpression (value = 1)
|
||||||
|
ULiteralExpression (value = 2)
|
||||||
|
ULiteralExpression (value = 3)
|
||||||
|
UAnnotation (fqName = IntRange)
|
||||||
|
UNamedExpression (name = from)
|
||||||
|
ULiteralExpression (value = 10)
|
||||||
|
UNamedExpression (name = to)
|
||||||
|
ULiteralExpression (value = 0)
|
||||||
|
UAnnotation (fqName = WithDefaultValue)
|
||||||
|
UAnnotation (fqName = SuppressLint)
|
||||||
|
UNamedExpression (name = value)
|
||||||
|
ULiteralExpression (value = "Lorem")
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
ULiteralExpression (value = 5)
|
||||||
|
UMethod (name = bar)
|
||||||
|
UAnnotation (fqName = IntRange)
|
||||||
|
UNamedExpression (name = from)
|
||||||
|
ULiteralExpression (value = 0)
|
||||||
|
UNamedExpression (name = to)
|
||||||
|
ULiteralExpression (value = 100)
|
||||||
|
UAnnotation (fqName = SuppressLint)
|
||||||
|
UNamedExpression (name = value)
|
||||||
|
UCallExpression (kind = UastCallKind(name='array_initializer'), argCount = 3))
|
||||||
|
ULiteralExpression (value = "Lorem")
|
||||||
|
ULiteralExpression (value = "Ipsum")
|
||||||
|
ULiteralExpression (value = "Dolor")
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = Unit)
|
||||||
|
UMethod (name = fooWithArrLiteral)
|
||||||
|
UAnnotation (fqName = RequiresPermission)
|
||||||
|
UNamedExpression (name = anyOf)
|
||||||
|
UCallExpression (kind = UastCallKind(name='array_initializer'), argCount = 3))
|
||||||
|
UIdentifier (Identifier ([))
|
||||||
|
ULiteralExpression (value = 1)
|
||||||
|
ULiteralExpression (value = 2)
|
||||||
|
ULiteralExpression (value = 3)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
ULiteralExpression (value = 5)
|
||||||
|
UMethod (name = fooWithStrArrLiteral)
|
||||||
|
UAnnotation (fqName = RequiresStrPermission)
|
||||||
|
UNamedExpression (name = strs)
|
||||||
|
UCallExpression (kind = UastCallKind(name='array_initializer'), argCount = 3))
|
||||||
|
UIdentifier (Identifier ([))
|
||||||
|
ULiteralExpression (value = "a")
|
||||||
|
ULiteralExpression (value = "b")
|
||||||
|
ULiteralExpression (value = "c")
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
ULiteralExpression (value = 3)
|
||||||
|
UClass (name = IntRange)
|
||||||
|
UAnnotationMethod (name = from)
|
||||||
|
UAnnotationMethod (name = to)
|
||||||
|
UClass (name = RequiresPermission)
|
||||||
|
UAnnotationMethod (name = anyOf)
|
||||||
|
UClass (name = RequiresStrPermission)
|
||||||
|
UAnnotationMethod (name = strs)
|
||||||
|
UClass (name = WithDefaultValue)
|
||||||
|
UAnnotationMethod (name = value)
|
||||||
|
ULiteralExpression (value = 42)
|
||||||
|
UClass (name = SuppressLint)
|
||||||
|
UAnnotationMethod (name = value)
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
public final class AnnotationParametersKt {
|
||||||
|
@RequiresPermission(anyOf = intArrayOf(1, 2, 3))
|
||||||
|
@IntRange(from = 10, to = 0)
|
||||||
|
@WithDefaultValue
|
||||||
|
@SuppressLint(value = "Lorem")
|
||||||
|
public static final fun foo() : int {
|
||||||
|
return 5
|
||||||
|
}
|
||||||
|
@IntRange(from = 0, to = 100)
|
||||||
|
@SuppressLint(value = <noref>("Lorem", "Ipsum", "Dolor"))
|
||||||
|
public static final fun bar() : void {
|
||||||
|
return Unit
|
||||||
|
}
|
||||||
|
@RequiresPermission(anyOf = collectionLiteral[1, 2, 3])
|
||||||
|
public static final fun fooWithArrLiteral() : int {
|
||||||
|
return 5
|
||||||
|
}
|
||||||
|
@RequiresStrPermission(strs = collectionLiteral["a", "b", "c"])
|
||||||
|
public static final fun fooWithStrArrLiteral() : int {
|
||||||
|
return 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract annotation IntRange {
|
||||||
|
public abstract fun from() : long = UastEmptyExpression
|
||||||
|
public abstract fun to() : long = UastEmptyExpression
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract annotation RequiresPermission {
|
||||||
|
public abstract fun anyOf() : int[] = UastEmptyExpression
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract annotation RequiresStrPermission {
|
||||||
|
public abstract fun strs() : java.lang.String[] = UastEmptyExpression
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract annotation WithDefaultValue {
|
||||||
|
public abstract fun value() : int = UastEmptyExpression
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract annotation SuppressLint {
|
||||||
|
public abstract fun value() : java.lang.String[] = UastEmptyExpression
|
||||||
|
}
|
||||||
@@ -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 = PsiClass: 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,18 @@
|
|||||||
|
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 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() {} }
|
||||||
|
}
|
||||||
|
public static final fun withErr() : void {
|
||||||
|
var runnable: <ErrorType> = anonymous null
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = AssertionKt)
|
||||||
|
UMethod (name = foo)
|
||||||
|
UBlockExpression
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = s)
|
||||||
|
ULiteralExpression (value = "Not Null")
|
||||||
|
UReturnExpression
|
||||||
|
UPostfixExpression (operator = !!)
|
||||||
|
USimpleNameReferenceExpression (identifier = s)
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
public final class AssertionKt {
|
||||||
|
public static final fun foo() : java.lang.String {
|
||||||
|
var s: java.lang.String = "Not Null"
|
||||||
|
return s!!
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = BitwiseKt)
|
||||||
|
UMethod (name = foo)
|
||||||
|
UBlockExpression
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = mask)
|
||||||
|
ULiteralExpression (value = 127)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = x)
|
||||||
|
ULiteralExpression (value = 2863311530)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = pos)
|
||||||
|
UBinaryExpression (operator = &)
|
||||||
|
USimpleNameReferenceExpression (identifier = x)
|
||||||
|
USimpleNameReferenceExpression (identifier = mask)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = max)
|
||||||
|
UBinaryExpression (operator = |)
|
||||||
|
USimpleNameReferenceExpression (identifier = x)
|
||||||
|
USimpleNameReferenceExpression (identifier = mask)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = zebra)
|
||||||
|
UBinaryExpression (operator = ^)
|
||||||
|
USimpleNameReferenceExpression (identifier = x)
|
||||||
|
USimpleNameReferenceExpression (identifier = mask)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = signed)
|
||||||
|
UBinaryExpression (operator = >>)
|
||||||
|
USimpleNameReferenceExpression (identifier = x)
|
||||||
|
ULiteralExpression (value = 2)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = one)
|
||||||
|
UBinaryExpression (operator = >>>)
|
||||||
|
USimpleNameReferenceExpression (identifier = x)
|
||||||
|
ULiteralExpression (value = 31)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = zero)
|
||||||
|
UBinaryExpression (operator = <<)
|
||||||
|
USimpleNameReferenceExpression (identifier = x)
|
||||||
|
ULiteralExpression (value = 32)
|
||||||
|
UReturnExpression
|
||||||
|
UBinaryExpression (operator = -)
|
||||||
|
UBinaryExpression (operator = +)
|
||||||
|
USimpleNameReferenceExpression (identifier = pos)
|
||||||
|
USimpleNameReferenceExpression (identifier = zero)
|
||||||
|
UBinaryExpression (operator = /)
|
||||||
|
UBinaryExpression (operator = *)
|
||||||
|
USimpleNameReferenceExpression (identifier = zebra)
|
||||||
|
USimpleNameReferenceExpression (identifier = signed)
|
||||||
|
USimpleNameReferenceExpression (identifier = one)
|
||||||
|
UMethod (name = bar)
|
||||||
|
UBlockExpression
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = mask)
|
||||||
|
ULiteralExpression (value = 127)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = x)
|
||||||
|
ULiteralExpression (value = 6148914691236517205)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = pos)
|
||||||
|
UBinaryExpression (operator = &)
|
||||||
|
USimpleNameReferenceExpression (identifier = x)
|
||||||
|
USimpleNameReferenceExpression (identifier = mask)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = max)
|
||||||
|
UBinaryExpression (operator = |)
|
||||||
|
USimpleNameReferenceExpression (identifier = x)
|
||||||
|
USimpleNameReferenceExpression (identifier = mask)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = zebra)
|
||||||
|
UBinaryExpression (operator = ^)
|
||||||
|
USimpleNameReferenceExpression (identifier = x)
|
||||||
|
USimpleNameReferenceExpression (identifier = mask)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = signed)
|
||||||
|
UBinaryExpression (operator = >>)
|
||||||
|
USimpleNameReferenceExpression (identifier = x)
|
||||||
|
ULiteralExpression (value = 2)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = one)
|
||||||
|
UBinaryExpression (operator = >>>)
|
||||||
|
USimpleNameReferenceExpression (identifier = x)
|
||||||
|
ULiteralExpression (value = 63)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = zero)
|
||||||
|
UBinaryExpression (operator = <<)
|
||||||
|
USimpleNameReferenceExpression (identifier = x)
|
||||||
|
ULiteralExpression (value = 64)
|
||||||
|
UReturnExpression
|
||||||
|
UBinaryExpression (operator = -)
|
||||||
|
UBinaryExpression (operator = +)
|
||||||
|
USimpleNameReferenceExpression (identifier = pos)
|
||||||
|
USimpleNameReferenceExpression (identifier = zero)
|
||||||
|
UBinaryExpression (operator = /)
|
||||||
|
UBinaryExpression (operator = *)
|
||||||
|
USimpleNameReferenceExpression (identifier = zebra)
|
||||||
|
USimpleNameReferenceExpression (identifier = signed)
|
||||||
|
USimpleNameReferenceExpression (identifier = one)
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
public final class BitwiseKt {
|
||||||
|
public static final fun foo() : int {
|
||||||
|
var mask: int = 127
|
||||||
|
var x: int = 2863311530
|
||||||
|
var pos: int = x & mask
|
||||||
|
var max: int = x | mask
|
||||||
|
var zebra: int = x ^ mask
|
||||||
|
var signed: int = x >> 2
|
||||||
|
var one: int = x >>> 31
|
||||||
|
var zero: int = x << 32
|
||||||
|
return pos + zero - zebra * signed / one
|
||||||
|
}
|
||||||
|
public static final fun bar() : long {
|
||||||
|
var mask: long = 127
|
||||||
|
var x: long = 6148914691236517205
|
||||||
|
var pos: long = x & mask
|
||||||
|
var max: long = x | mask
|
||||||
|
var zebra: long = x ^ mask
|
||||||
|
var signed: long = x >> 2
|
||||||
|
var one: long = x >>> 63
|
||||||
|
var zero: long = x << 64
|
||||||
|
return pos + zero - zebra * signed / one
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = BrokenMethodKt)
|
||||||
|
UMethod (name = main)
|
||||||
|
UParameter (name = args)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UDeclarationsExpression
|
||||||
|
UClass (name = TestUsed)
|
||||||
|
UField (name = parameter)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UMethod (name = getParameter)
|
||||||
|
UMethod (name = TestUsed)
|
||||||
|
UParameter (name = parameter)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UMethod (name = component1)
|
||||||
|
UMethod (name = copy)
|
||||||
|
UParameter (name = parameter)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UMethod (name = toString)
|
||||||
|
UMethod (name = hashCode)
|
||||||
|
UMethod (name = equals)
|
||||||
|
UParameter (name = other)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UClass (name = Used)
|
||||||
|
UField (name = Companion)
|
||||||
|
UAnnotation (fqName = null)
|
||||||
|
UField (name = parameter)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UMethod (name = getParameter)
|
||||||
|
UMethod (name = Used)
|
||||||
|
UParameter (name = parameter)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UMethod (name = component1)
|
||||||
|
UMethod (name = copy)
|
||||||
|
UParameter (name = parameter)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UMethod (name = toString)
|
||||||
|
UMethod (name = hashCode)
|
||||||
|
UMethod (name = equals)
|
||||||
|
UParameter (name = other)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UClass (name = Companion)
|
||||||
|
UMethod (name = doStuff1)
|
||||||
|
UParameter (name = $this$doStuff1)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (Used))
|
||||||
|
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = PsiClass: Used)
|
||||||
|
UThisExpression (label = null)
|
||||||
|
UMethod (name = Companion)
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
public final class BrokenMethodKt {
|
||||||
|
public static final fun main(@org.jetbrains.annotations.NotNull args: java.lang.String[]) : void {
|
||||||
|
public static final class TestUsed {
|
||||||
|
@org.jetbrains.annotations.NotNull private final var parameter: java.lang.CharSequence
|
||||||
|
public final fun getParameter() : java.lang.CharSequence = UastEmptyExpression
|
||||||
|
public fun TestUsed(@org.jetbrains.annotations.NotNull parameter: java.lang.CharSequence) = UastEmptyExpression
|
||||||
|
public final fun component1() : java.lang.CharSequence = UastEmptyExpression
|
||||||
|
public final fun copy(@org.jetbrains.annotations.NotNull parameter: java.lang.CharSequence) : TestUsed = UastEmptyExpression
|
||||||
|
public fun toString() : java.lang.String = UastEmptyExpression
|
||||||
|
public fun hashCode() : int = UastEmptyExpression
|
||||||
|
public fun equals(@org.jetbrains.annotations.Nullable other: java.lang.Object) : boolean = UastEmptyExpression
|
||||||
|
private static final class Used {
|
||||||
|
@null public static final var Companion: Companion
|
||||||
|
@org.jetbrains.annotations.NotNull private final var parameter: java.lang.Object
|
||||||
|
public final fun getParameter() : java.lang.Object = UastEmptyExpression
|
||||||
|
public fun Used(@org.jetbrains.annotations.NotNull parameter: java.lang.Object) = UastEmptyExpression
|
||||||
|
public final fun component1() : java.lang.Object = UastEmptyExpression
|
||||||
|
public final fun copy(@org.jetbrains.annotations.NotNull parameter: java.lang.Object) : Used = UastEmptyExpression
|
||||||
|
public fun toString() : java.lang.String = UastEmptyExpression
|
||||||
|
public fun hashCode() : int = UastEmptyExpression
|
||||||
|
public fun equals(@org.jetbrains.annotations.Nullable other: java.lang.Object) : boolean = UastEmptyExpression
|
||||||
|
public static final class Companion {
|
||||||
|
public final fun doStuff1(@org.jetbrains.annotations.NotNull $this$doStuff1: java.lang.Object) : Used {
|
||||||
|
return <init>(this)
|
||||||
|
}
|
||||||
|
private fun Companion() = UastEmptyExpression
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = A)
|
||||||
|
UAnnotation (fqName = null)
|
||||||
|
UMethod (name = A)
|
||||||
|
UClass (name = MyAnnotation)
|
||||||
|
UAnnotationMethod (name = text)
|
||||||
|
UClass (name = B)
|
||||||
|
UAnnotation (fqName = MyAnnotation)
|
||||||
|
UNamedExpression (name = text)
|
||||||
|
ULiteralExpression (value = "class")
|
||||||
|
UField (name = Companion)
|
||||||
|
UAnnotation (fqName = null)
|
||||||
|
UMethod (name = B)
|
||||||
|
UClass (name = InB)
|
||||||
|
UAnnotation (fqName = MyAnnotation)
|
||||||
|
UNamedExpression (name = text)
|
||||||
|
ULiteralExpression (value = "inB class")
|
||||||
|
UMethod (name = InB)
|
||||||
|
UClass (name = Companion)
|
||||||
|
UAnnotation (fqName = MyAnnotation)
|
||||||
|
UNamedExpression (name = text)
|
||||||
|
ULiteralExpression (value = "companion")
|
||||||
|
UMethod (name = Companion)
|
||||||
|
UClass (name = Obj)
|
||||||
|
UAnnotation (fqName = MyAnnotation)
|
||||||
|
UNamedExpression (name = text)
|
||||||
|
ULiteralExpression (value = "object")
|
||||||
|
UField (name = INSTANCE)
|
||||||
|
UAnnotation (fqName = null)
|
||||||
|
UMethod (name = Obj)
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
public final class A {
|
||||||
|
public fun A() = UastEmptyExpression
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract annotation MyAnnotation {
|
||||||
|
public abstract fun text() : java.lang.String = UastEmptyExpression
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class B {
|
||||||
|
@null public static final var Companion: B.Companion
|
||||||
|
public fun B() = UastEmptyExpression
|
||||||
|
public static final class InB {
|
||||||
|
public fun InB() = UastEmptyExpression
|
||||||
|
}
|
||||||
|
public static final class Companion {
|
||||||
|
private fun Companion() = UastEmptyExpression
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class Obj {
|
||||||
|
@null public static final var INSTANCE: Obj
|
||||||
|
private fun Obj() = UastEmptyExpression
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
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 = PsiClass: 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)
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
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
|
||||||
|
}
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
class A(val str: String) {
|
|
||||||
|
|
||||||
constructor(i: Int) : this(i.toString())
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
class AWithInit(val str: String) {
|
|
||||||
|
|
||||||
init {
|
|
||||||
println()
|
|
||||||
}
|
|
||||||
|
|
||||||
constructor(i: Int) : this(i.toString())
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
class AWith2Init(val str: String) {
|
|
||||||
|
|
||||||
init {
|
|
||||||
println(1)
|
|
||||||
}
|
|
||||||
|
|
||||||
init {
|
|
||||||
println(2)
|
|
||||||
}
|
|
||||||
|
|
||||||
constructor(i: Int) : this(i.toString())
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
class AOnlyInit {
|
|
||||||
|
|
||||||
init {
|
|
||||||
println(1)
|
|
||||||
}
|
|
||||||
|
|
||||||
init {
|
|
||||||
println(2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class AWithSecondary {
|
|
||||||
|
|
||||||
lateinit var a: String
|
|
||||||
|
|
||||||
constructor(i: Int) {
|
|
||||||
a = i.toString()
|
|
||||||
}
|
|
||||||
|
|
||||||
constructor(s: String) {
|
|
||||||
a = s
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
class AWithSecondaryInit {
|
|
||||||
|
|
||||||
lateinit var a: String
|
|
||||||
|
|
||||||
init {
|
|
||||||
println()
|
|
||||||
}
|
|
||||||
|
|
||||||
constructor(i: Int) {
|
|
||||||
a = i.toString()
|
|
||||||
}
|
|
||||||
|
|
||||||
constructor(s: String) {
|
|
||||||
a = s
|
|
||||||
var local: String = s
|
|
||||||
local.toString()
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
class AWithFieldInit(i: Int) {
|
|
||||||
val a: String
|
|
||||||
init {
|
|
||||||
a = i.toString()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = CycleInTypeParametersKt)
|
||||||
|
UField (name = a)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UBinaryExpressionWithType
|
||||||
|
ULiteralExpression (value = null)
|
||||||
|
UTypeReferenceExpression (name = Device<?>)
|
||||||
|
UMethod (name = getA)
|
||||||
|
UClass (name = Device)
|
||||||
|
UMethod (name = Device)
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
public final class CycleInTypeParametersKt {
|
||||||
|
@org.jetbrains.annotations.Nullable private static final var a: Device<?> = null as? Device<?>
|
||||||
|
public static final fun getA() : Device<?> = UastEmptyExpression
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class Device {
|
||||||
|
public fun Device() = UastEmptyExpression
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = Foo)
|
||||||
|
UMethod (name = bar)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
ULiteralExpression (value = "Hello!")
|
||||||
|
UClass (name = Baz)
|
||||||
|
UMethod (name = Baz)
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
public abstract interface Foo {
|
||||||
|
public default fun bar() : java.lang.String {
|
||||||
|
return "Hello!"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class Baz : Foo {
|
||||||
|
public fun Baz() = UastEmptyExpression
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = DefaultParameterValuesKt)
|
||||||
|
UMethod (name = foo)
|
||||||
|
UParameter (name = a)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
ULiteralExpression (value = 1)
|
||||||
|
UParameter (name = foo)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
ULiteralExpression (value = null)
|
||||||
|
UBlockExpression
|
||||||
+4
@@ -0,0 +1,4 @@
|
|||||||
|
public final class DefaultParameterValuesKt {
|
||||||
|
public static final fun foo(@org.jetbrains.annotations.NotNull a: int, @org.jetbrains.annotations.Nullable foo: java.lang.String) : void {
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = MyColor)
|
||||||
|
UField (name = x)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UField (name = y)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UField (name = z)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UMethod (name = getX)
|
||||||
|
UMethod (name = getY)
|
||||||
|
UMethod (name = getZ)
|
||||||
|
UMethod (name = MyColor)
|
||||||
|
UParameter (name = x)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = y)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = z)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UClass (name = Some)
|
||||||
|
UField (name = delegate$delegate)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (lazy))
|
||||||
|
USimpleNameReferenceExpression (identifier = lazy, resolvesTo = null)
|
||||||
|
ULambdaExpression
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 3))
|
||||||
|
UIdentifier (Identifier (MyColor))
|
||||||
|
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = PsiClass: MyColor)
|
||||||
|
ULiteralExpression (value = 18)
|
||||||
|
ULiteralExpression (value = 2)
|
||||||
|
ULiteralExpression (value = 3)
|
||||||
|
UField (name = lambda)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (lazy))
|
||||||
|
USimpleNameReferenceExpression (identifier = lazy, resolvesTo = null)
|
||||||
|
ULambdaExpression
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 3))
|
||||||
|
UIdentifier (Identifier (MyColor))
|
||||||
|
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = PsiClass: MyColor)
|
||||||
|
ULiteralExpression (value = 1)
|
||||||
|
ULiteralExpression (value = 2)
|
||||||
|
ULiteralExpression (value = 3)
|
||||||
|
UField (name = nonLazy)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 3))
|
||||||
|
UIdentifier (Identifier (MyColor))
|
||||||
|
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = PsiClass: MyColor)
|
||||||
|
ULiteralExpression (value = 1)
|
||||||
|
ULiteralExpression (value = 2)
|
||||||
|
ULiteralExpression (value = 3)
|
||||||
|
UMethod (name = getDelegate)
|
||||||
|
UMethod (name = getLambda)
|
||||||
|
UMethod (name = getNonLazy)
|
||||||
|
UMethod (name = Some)
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
public final class MyColor {
|
||||||
|
@org.jetbrains.annotations.NotNull private final var x: int
|
||||||
|
@org.jetbrains.annotations.NotNull private final var y: int
|
||||||
|
@org.jetbrains.annotations.NotNull private final var z: int
|
||||||
|
public final fun getX() : int = UastEmptyExpression
|
||||||
|
public final fun getY() : int = UastEmptyExpression
|
||||||
|
public final fun getZ() : int = UastEmptyExpression
|
||||||
|
public fun MyColor(@org.jetbrains.annotations.NotNull x: int, @org.jetbrains.annotations.NotNull y: int, @org.jetbrains.annotations.NotNull z: int) = UastEmptyExpression
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class Some {
|
||||||
|
@org.jetbrains.annotations.NotNull private final var delegate$delegate: kotlin.Lazy
|
||||||
|
@org.jetbrains.annotations.NotNull private final var lambda: kotlin.Lazy<MyColor> = lazy({
|
||||||
|
return <init>(1, 2, 3)
|
||||||
|
})
|
||||||
|
@org.jetbrains.annotations.NotNull private final var nonLazy: MyColor = <init>(1, 2, 3)
|
||||||
|
public final fun getDelegate() : MyColor = UastEmptyExpression
|
||||||
|
public final fun getLambda() : kotlin.Lazy<MyColor> = UastEmptyExpression
|
||||||
|
public final fun getNonLazy() : MyColor = UastEmptyExpression
|
||||||
|
public fun Some() = UastEmptyExpression
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
UFile (package = test.pkg)
|
||||||
|
UClass (name = Test)
|
||||||
|
UMethod (name = test1)
|
||||||
|
UBlockExpression
|
||||||
|
UMethod (name = Test)
|
||||||
|
UMethod (name = test2)
|
||||||
|
UAnnotation (fqName = kotlin.Deprecated)
|
||||||
|
UNamedExpression (name = level)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = DeprecationLevel)
|
||||||
|
USimpleNameReferenceExpression (identifier = HIDDEN)
|
||||||
|
UNamedExpression (name = message)
|
||||||
|
ULiteralExpression (value = "nothing")
|
||||||
|
UBlockExpression
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package test.pkg
|
||||||
|
|
||||||
|
public final class Test {
|
||||||
|
public final fun test1() : void {
|
||||||
|
}
|
||||||
|
public fun Test() = UastEmptyExpression
|
||||||
|
@kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "nothing")
|
||||||
|
fun test2() : void {
|
||||||
|
}
|
||||||
|
}
|
||||||
+49
@@ -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 = var268d4435)
|
||||||
|
UAnnotation (fqName = null)
|
||||||
|
UBinaryExpression (operator = <other>)
|
||||||
|
ULiteralExpression (value = "foo")
|
||||||
|
ULiteralExpression (value = 1)
|
||||||
|
ULocalVariable (name = a)
|
||||||
|
UAnnotation (fqName = null)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = var268d4435)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (component1))
|
||||||
|
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null)
|
||||||
|
ULocalVariable (name = b)
|
||||||
|
UAnnotation (fqName = null)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = var268d4435)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (component2))
|
||||||
|
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = var46597b30)
|
||||||
|
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 = var46597b30)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (component1))
|
||||||
|
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null)
|
||||||
|
ULocalVariable (name = v)
|
||||||
|
UAnnotation (fqName = null)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = var46597b30)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (component2))
|
||||||
|
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null)
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
public final class DestructuringDeclarationKt {
|
||||||
|
public static final fun foo(@org.jetbrains.annotations.NotNull data: java.lang.Object) : void {
|
||||||
|
@null var var268d4435: <ErrorType> = "foo" <other> 1
|
||||||
|
@null var a: java.lang.String = var268d4435.<anonymous class>()
|
||||||
|
@null var b: int = var268d4435.<anonymous class>()
|
||||||
|
@null @kotlin.Suppress(names = "UNCHECKED_CAST") var var46597b30: <ErrorType> = data as kotlin.Pair<? extends java.lang.String,? extends java.lang.String>
|
||||||
|
@null var k: java.lang.String = var46597b30.<anonymous class>()
|
||||||
|
@null var v: java.lang.String = var46597b30.<anonymous class>()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = ElvisKt)
|
||||||
|
UMethod (name = foo)
|
||||||
|
UParameter (name = bar)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
ULiteralExpression (value = null)
|
||||||
|
UMethod (name = bar)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
ULiteralExpression (value = 42)
|
||||||
|
UMethod (name = baz)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
UExpressionList (elvis)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = var243c5407)
|
||||||
|
UExpressionList (elvis)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = varc4aef7d0)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (foo))
|
||||||
|
USimpleNameReferenceExpression (identifier = foo, resolvesTo = null)
|
||||||
|
ULiteralExpression (value = "Lorem ipsum")
|
||||||
|
UIfExpression
|
||||||
|
UBinaryExpression (operator = !=)
|
||||||
|
USimpleNameReferenceExpression (identifier = varc4aef7d0)
|
||||||
|
ULiteralExpression (value = null)
|
||||||
|
USimpleNameReferenceExpression (identifier = varc4aef7d0)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (foo))
|
||||||
|
USimpleNameReferenceExpression (identifier = foo, resolvesTo = null)
|
||||||
|
ULiteralExpression (value = "dolor sit amet")
|
||||||
|
UIfExpression
|
||||||
|
UBinaryExpression (operator = !=)
|
||||||
|
USimpleNameReferenceExpression (identifier = var243c5407)
|
||||||
|
ULiteralExpression (value = null)
|
||||||
|
USimpleNameReferenceExpression (identifier = var243c5407)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (bar))
|
||||||
|
USimpleNameReferenceExpression (identifier = bar, resolvesTo = null)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (toString))
|
||||||
|
USimpleNameReferenceExpression (identifier = toString, resolvesTo = null)
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
public final class ElvisKt {
|
||||||
|
public static final fun foo(@org.jetbrains.annotations.NotNull bar: java.lang.String) : java.lang.String {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
public static final fun bar() : int {
|
||||||
|
return 42
|
||||||
|
}
|
||||||
|
public static final fun baz() : java.lang.String {
|
||||||
|
return elvis {
|
||||||
|
var var243c5407: java.lang.String = elvis {
|
||||||
|
var varc4aef7d0: java.lang.String = foo("Lorem ipsum")
|
||||||
|
if (varc4aef7d0 != null) varc4aef7d0 else foo("dolor sit amet")
|
||||||
|
}
|
||||||
|
if (var243c5407 != null) var243c5407 else bar().toString()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = ElvisTypeKt)
|
||||||
|
UMethod (name = foo)
|
||||||
|
UParameter (name = text)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (bar))
|
||||||
|
USimpleNameReferenceExpression (identifier = bar, resolvesTo = null)
|
||||||
|
UExpressionList (elvis)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = var63c49860)
|
||||||
|
USimpleNameReferenceExpression (identifier = text)
|
||||||
|
UIfExpression
|
||||||
|
UBinaryExpression (operator = !=)
|
||||||
|
USimpleNameReferenceExpression (identifier = var63c49860)
|
||||||
|
ULiteralExpression (value = null)
|
||||||
|
USimpleNameReferenceExpression (identifier = var63c49860)
|
||||||
|
UReturnExpression
|
||||||
|
UMethod (name = bar)
|
||||||
|
UParameter (name = o)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
public final class ElvisTypeKt {
|
||||||
|
public static final fun foo(@org.jetbrains.annotations.Nullable text: java.lang.String) : void {
|
||||||
|
return bar(elvis {
|
||||||
|
var var63c49860: java.lang.String = text
|
||||||
|
if (var63c49860 != null) var63c49860 else return
|
||||||
|
})
|
||||||
|
}
|
||||||
|
public static final fun bar(@org.jetbrains.annotations.NotNull o: java.lang.Object) : void {
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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,24 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = Style)
|
||||||
|
UField (name = value)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UEnumConstant (name = SYSTEM)
|
||||||
|
UAnnotation (fqName = null)
|
||||||
|
USimpleNameReferenceExpression (identifier = Style)
|
||||||
|
ULiteralExpression (value = "system")
|
||||||
|
UEnumConstant (name = USER)
|
||||||
|
UAnnotation (fqName = null)
|
||||||
|
USimpleNameReferenceExpression (identifier = Style)
|
||||||
|
ULiteralExpression (value = "user")
|
||||||
|
UEnumConstant (name = INTERNAL)
|
||||||
|
UAnnotation (fqName = null)
|
||||||
|
USimpleNameReferenceExpression (identifier = Style)
|
||||||
|
ULiteralExpression (value = "internal")
|
||||||
|
UEnumConstant (name = UNKNOWN)
|
||||||
|
UAnnotation (fqName = null)
|
||||||
|
USimpleNameReferenceExpression (identifier = Style)
|
||||||
|
ULiteralExpression (value = null)
|
||||||
|
UMethod (name = getValue)
|
||||||
|
UMethod (name = Style)
|
||||||
|
UParameter (name = value)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
public enum Style {
|
||||||
|
@org.jetbrains.annotations.Nullable private final var value: java.lang.String
|
||||||
|
@null SYSTEM("system")
|
||||||
|
@null USER("user")
|
||||||
|
@null INTERNAL("internal")
|
||||||
|
@null UNKNOWN(null)
|
||||||
|
public final fun getValue() : java.lang.String = UastEmptyExpression
|
||||||
|
private fun Style(@org.jetbrains.annotations.Nullable value: java.lang.String) = UastEmptyExpression
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = IfStatementKt)
|
||||||
|
UMethod (name = foo)
|
||||||
|
UBlockExpression
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = x)
|
||||||
|
UIfExpression
|
||||||
|
UBinaryExpression (operator = !=)
|
||||||
|
ULiteralExpression (value = "abc")
|
||||||
|
ULiteralExpression (value = "def")
|
||||||
|
ULiteralExpression (value = 1)
|
||||||
|
ULiteralExpression (value = 0)
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
public final class IfStatementKt {
|
||||||
|
public static final fun foo() : void {
|
||||||
|
var x: int = if ("abc" != "def") 1 else 0
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
import java.lang.Thread.currentThread
|
|
||||||
import java.lang.Thread.NORM_PRIORITY
|
|
||||||
import java.lang.Thread.UncaughtExceptionHandler
|
|
||||||
import java.lang.Thread.sleep
|
|
||||||
import kotlin.collections.emptyList
|
|
||||||
import kotlin.Int.Companion.SIZE_BYTES
|
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = InKt)
|
||||||
|
UMethod (name = foo)
|
||||||
|
UBlockExpression
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = x)
|
||||||
|
ULiteralExpression (value = 1)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = y)
|
||||||
|
ULiteralExpression (value = 10)
|
||||||
|
UReturnExpression
|
||||||
|
UBinaryExpression (operator = &&)
|
||||||
|
UBinaryExpression (operator = in)
|
||||||
|
USimpleNameReferenceExpression (identifier = x)
|
||||||
|
UBinaryExpression (operator = ..)
|
||||||
|
ULiteralExpression (value = 0)
|
||||||
|
ULiteralExpression (value = 5)
|
||||||
|
UBinaryExpression (operator = !in)
|
||||||
|
USimpleNameReferenceExpression (identifier = y)
|
||||||
|
UBinaryExpression (operator = ..)
|
||||||
|
ULiteralExpression (value = 4)
|
||||||
|
ULiteralExpression (value = 9)
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
public final class InKt {
|
||||||
|
public static final fun foo() : boolean {
|
||||||
|
var x: int = 1
|
||||||
|
var y: int = 10
|
||||||
|
return x in 0 .. 5 && y !in 4 .. 9
|
||||||
|
}
|
||||||
|
}
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = InferenceInsideUnresolvedConstructorKt)
|
||||||
|
UMethod (name = getBar)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (Unresolved))
|
||||||
|
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (id))
|
||||||
|
USimpleNameReferenceExpression (identifier = id, resolvesTo = null)
|
||||||
|
ULiteralExpression (value = 42)
|
||||||
|
UMethod (name = id)
|
||||||
|
UParameter (name = x)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = x)
|
||||||
Vendored
+8
@@ -0,0 +1,8 @@
|
|||||||
|
public final class InferenceInsideUnresolvedConstructorKt {
|
||||||
|
public static final fun getBar() : java.lang.Object {
|
||||||
|
return <anonymous class>(id(42))
|
||||||
|
}
|
||||||
|
public static final fun id(@org.jetbrains.annotations.Nullable x: T) : T {
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = Foo)
|
||||||
|
UMethod (name = Foo)
|
||||||
|
UClass (name = Bar)
|
||||||
|
UField (name = a)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UField (name = b)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UMethod (name = getAPlusB)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
UBinaryExpression (operator = +)
|
||||||
|
USimpleNameReferenceExpression (identifier = a)
|
||||||
|
USimpleNameReferenceExpression (identifier = b)
|
||||||
|
UMethod (name = getA)
|
||||||
|
UMethod (name = getB)
|
||||||
|
UMethod (name = Bar)
|
||||||
|
UParameter (name = a)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = b)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UClass (name = Baz)
|
||||||
|
UMethod (name = doNothing)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = Unit)
|
||||||
|
UMethod (name = Baz)
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
public final class Foo {
|
||||||
|
public fun Foo() = UastEmptyExpression
|
||||||
|
public static final class Bar {
|
||||||
|
@org.jetbrains.annotations.NotNull private final var a: int
|
||||||
|
@org.jetbrains.annotations.NotNull private final var b: int
|
||||||
|
public final fun getAPlusB() : int {
|
||||||
|
return a + b
|
||||||
|
}
|
||||||
|
public final fun getA() : int = UastEmptyExpression
|
||||||
|
public final fun getB() : int = UastEmptyExpression
|
||||||
|
public fun Bar(@org.jetbrains.annotations.NotNull a: int, @org.jetbrains.annotations.NotNull b: int) = UastEmptyExpression
|
||||||
|
public static final class Baz {
|
||||||
|
public final fun doNothing() : void {
|
||||||
|
return Unit
|
||||||
|
}
|
||||||
|
public fun Baz() = UastEmptyExpression
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = InnerNonFixedTypeVariableKt)
|
||||||
|
UMethod (name = test)
|
||||||
|
UParameter (name = list)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = list)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (filterIsInstance))
|
||||||
|
USimpleNameReferenceExpression (identifier = filterIsInstance, resolvesTo = null)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2))
|
||||||
|
UIdentifier (Identifier (mapTo))
|
||||||
|
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (mutableSetOf))
|
||||||
|
USimpleNameReferenceExpression (identifier = mutableSetOf, resolvesTo = null)
|
||||||
|
ULambdaExpression
|
||||||
|
UBlockExpression
|
||||||
|
UClass (name = Some)
|
||||||
|
UMethod (name = Some)
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
public final class InnerNonFixedTypeVariableKt {
|
||||||
|
public static final fun test(@org.jetbrains.annotations.NotNull list: java.util.List<? extends java.lang.Object>) : void {
|
||||||
|
list.filterIsInstance().<anonymous class>(mutableSetOf(), {
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class Some {
|
||||||
|
public fun Some() = UastEmptyExpression
|
||||||
|
}
|
||||||
@@ -0,0 +1,141 @@
|
|||||||
|
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
|
||||||
|
UParameter (name = it)
|
||||||
|
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 = vardbcd09b4)
|
||||||
|
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 = vardbcd09b4)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (component1))
|
||||||
|
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null)
|
||||||
|
ULocalVariable (name = b)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = vardbcd09b4)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (component2))
|
||||||
|
USimpleNameReferenceExpression (identifier = <anonymous class>, 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,45 @@
|
|||||||
|
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({ var it: int ->
|
||||||
|
|
||||||
|
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 vardbcd09b4: <ErrorType> = listOf(1, 2)
|
||||||
|
@org.jetbrains.annotations.NotNull var a: int = vardbcd09b4.<anonymous class>()
|
||||||
|
@org.jetbrains.annotations.NotNull var b: int = vardbcd09b4.<anonymous class>()
|
||||||
|
}
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UImportStatement (isOnDemand = false)
|
||||||
|
UClass (name = LambdasKt)
|
||||||
|
UMethod (name = foo)
|
||||||
|
UBlockExpression
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = Stream)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (empty))
|
||||||
|
USimpleNameReferenceExpression (identifier = empty, resolvesTo = null)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (filter))
|
||||||
|
USimpleNameReferenceExpression (identifier = filter, resolvesTo = null)
|
||||||
|
ULambdaExpression
|
||||||
|
UParameter (name = it)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = it)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (isEmpty))
|
||||||
|
USimpleNameReferenceExpression (identifier = isEmpty, resolvesTo = null)
|
||||||
|
UMethod (name = doSelectItem)
|
||||||
|
UParameter (name = selectItemFunction)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (selectItemFunction))
|
||||||
|
USimpleNameReferenceExpression (identifier = invoke, resolvesTo = null)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = baz)
|
||||||
|
ULambdaExpression
|
||||||
|
UBlockExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (Local))
|
||||||
|
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (baz))
|
||||||
|
USimpleNameReferenceExpression (identifier = invoke, resolvesTo = null)
|
||||||
|
UMethod (name = lambdaInPlaceCall)
|
||||||
|
UBlockExpression
|
||||||
|
UWhileExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier ({))
|
||||||
|
USimpleNameReferenceExpression (identifier = invoke, resolvesTo = null)
|
||||||
|
UBlockExpression
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import java.util.stream.Stream
|
||||||
|
|
||||||
|
public final class LambdasKt {
|
||||||
|
public static final fun foo() : void {
|
||||||
|
Stream.empty().filter({ var it: java.lang.String ->
|
||||||
|
|
||||||
|
return it.isEmpty()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
public static final fun doSelectItem(@org.jetbrains.annotations.NotNull selectItemFunction: kotlin.jvm.functions.Function0<kotlin.Unit>) : void {
|
||||||
|
invoke()
|
||||||
|
var baz: kotlin.jvm.functions.Function0<? extends kotlin.Unit> = fun () {
|
||||||
|
<anonymous class>()
|
||||||
|
}
|
||||||
|
invoke()
|
||||||
|
}
|
||||||
|
public static final fun lambdaInPlaceCall() : void {
|
||||||
|
while (invoke()) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 = PsiClass: Local)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = baz)
|
||||||
|
ULambdaExpression
|
||||||
|
UBlockExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (Local))
|
||||||
|
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = PsiClass: 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 = PsiClass: Local)
|
||||||
@@ -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>()
|
||||||
|
}
|
||||||
|
}
|
||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = LocalVariableWithAnnotationKt)
|
||||||
|
UMethod (name = foo)
|
||||||
|
UBlockExpression
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = bar)
|
||||||
|
UAnnotation (fqName = TestAnnotation)
|
||||||
|
ULiteralExpression (value = "lorem ipsum")
|
||||||
|
UClass (name = TestAnnotation)
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
public final class LocalVariableWithAnnotationKt {
|
||||||
|
public static final fun foo() : void {
|
||||||
|
@TestAnnotation var bar: java.lang.String = "lorem ipsum"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract annotation TestAnnotation {
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = ClassA)
|
||||||
|
UField (name = paramAndProp)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UField (name = writebleProp)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
ULiteralExpression (value = 0)
|
||||||
|
UMethod (name = getWritebleProp)
|
||||||
|
UMethod (name = setWritebleProp)
|
||||||
|
UParameter (name = writebleProp)
|
||||||
|
UAnnotation (fqName = null)
|
||||||
|
UMethod (name = getParamAndProp)
|
||||||
|
UMethod (name = ClassA)
|
||||||
|
UParameter (name = justParam)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = paramAndProp)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
public final class ClassA {
|
||||||
|
@org.jetbrains.annotations.NotNull private final var paramAndProp: java.lang.String
|
||||||
|
@org.jetbrains.annotations.NotNull private var writebleProp: int = 0
|
||||||
|
public final fun getWritebleProp() : int = UastEmptyExpression
|
||||||
|
public final fun setWritebleProp(@null writebleProp: int) : void = UastEmptyExpression
|
||||||
|
public final fun getParamAndProp() : java.lang.String = UastEmptyExpression
|
||||||
|
public fun ClassA(@org.jetbrains.annotations.NotNull justParam: int, @org.jetbrains.annotations.NotNull paramAndProp: java.lang.String) = UastEmptyExpression
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = MethodReferenceKt)
|
||||||
|
UField (name = x)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UCallableReferenceExpression (name = bar)
|
||||||
|
UMethod (name = getX)
|
||||||
|
UClass (name = Foo)
|
||||||
|
UMethod (name = bar)
|
||||||
|
UBlockExpression
|
||||||
|
UMethod (name = Foo)
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
public final class MethodReferenceKt {
|
||||||
|
@org.jetbrains.annotations.NotNull private static final var x: kotlin.reflect.KFunction<kotlin.Unit> = Foo::bar
|
||||||
|
public static final fun getX() : kotlin.reflect.KFunction<kotlin.Unit> = UastEmptyExpression
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class Foo {
|
||||||
|
public final fun bar() : void {
|
||||||
|
}
|
||||||
|
public fun Foo() = UastEmptyExpression
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = NameContainingFileKt)
|
||||||
|
UField (name = xyzzy)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
ULiteralExpression (value = 0)
|
||||||
|
UMethod (name = bar)
|
||||||
|
UBlockExpression
|
||||||
|
UMethod (name = getXyzzy)
|
||||||
|
UClass (name = Foo)
|
||||||
|
UMethod (name = Foo)
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
public final class NameContainingFileKt {
|
||||||
|
@org.jetbrains.annotations.NotNull private static final var xyzzy: int = 0
|
||||||
|
public static final fun bar() : void {
|
||||||
|
}
|
||||||
|
public static final fun getXyzzy() : int = UastEmptyExpression
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class Foo {
|
||||||
|
public fun Foo() = UastEmptyExpression
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = NonTrivialIdentifiersKt)
|
||||||
|
UMethod (name = main)
|
||||||
|
UParameter (name = a)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UBlockExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (())
|
||||||
|
USimpleNameReferenceExpression (identifier = invoke, resolvesTo = null)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = p)
|
||||||
|
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (A))
|
||||||
|
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = PsiClass: A)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier ({))
|
||||||
|
USimpleNameReferenceExpression (identifier = invoke, resolvesTo = null)
|
||||||
|
ULambdaExpression
|
||||||
|
UBlockExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (p))
|
||||||
|
USimpleNameReferenceExpression (identifier = invoke, resolvesTo = null)
|
||||||
|
ULambdaExpression
|
||||||
|
UBlockExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (())
|
||||||
|
USimpleNameReferenceExpression (identifier = invoke, resolvesTo = null)
|
||||||
|
UClass (name = A)
|
||||||
|
UMethod (name = invoke)
|
||||||
|
UBlockExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (())
|
||||||
|
USimpleNameReferenceExpression (identifier = invoke, resolvesTo = null)
|
||||||
|
UMethod (name = invoke)
|
||||||
|
UParameter (name = f)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UMethod (name = A)
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
public final class NonTrivialIdentifiersKt {
|
||||||
|
public static final fun main(@org.jetbrains.annotations.Nullable a: A) : void {
|
||||||
|
invoke()
|
||||||
|
var p: A = <init>()
|
||||||
|
invoke({
|
||||||
|
invoke({
|
||||||
|
invoke()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class A {
|
||||||
|
public final fun invoke() : void {
|
||||||
|
invoke()
|
||||||
|
}
|
||||||
|
public final fun invoke(@org.jetbrains.annotations.NotNull f: kotlin.jvm.functions.Function0<kotlin.Unit>) : void {
|
||||||
|
}
|
||||||
|
public fun A() = UastEmptyExpression
|
||||||
|
}
|
||||||
+31
@@ -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)
|
||||||
+30
@@ -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
|
||||||
|
}
|
||||||
@@ -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 = PsiClass: 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)
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
public final class ParametersDisorderKt {
|
||||||
|
public static final fun global(@org.jetbrains.annotations.NotNull a: int, @org.jetbrains.annotations.NotNull b: float) : void {
|
||||||
|
}
|
||||||
|
public static final fun withDefault(@org.jetbrains.annotations.NotNull c: int, @org.jetbrains.annotations.NotNull d: java.lang.String) : void {
|
||||||
|
}
|
||||||
|
public static final fun withReceiver(@org.jetbrains.annotations.NotNull $this$withReceiver: java.lang.String, @org.jetbrains.annotations.NotNull a: int, @org.jetbrains.annotations.NotNull b: float) : void {
|
||||||
|
}
|
||||||
|
public static final fun call() : void {
|
||||||
|
global(2.2, 2)
|
||||||
|
withDefault("bbb")
|
||||||
|
"abc".withReceiver(1, 1.2)
|
||||||
|
Math.atan2(1.3, 3.4)
|
||||||
|
<anonymous class>("param1", "param2")
|
||||||
|
java.lang.String.format("%i %i %i", 1, 2, 3)
|
||||||
|
java.lang.String.format("%i %i %i", arrayOf(1, 2, 3))
|
||||||
|
java.lang.String.format("%i %i %i", arrayOf(1, 2, 3), arrayOf(4, 5, 6))
|
||||||
|
java.lang.String.format("%i %i %i", "".chunked(2).toTypedArray())
|
||||||
|
with(<init>(), {
|
||||||
|
"def".with2Receivers(8, 7.0)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
public static final fun objectLiteral() : void {
|
||||||
|
anonymous object : Parent(b = 1, a = "foo") { }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class A {
|
||||||
|
public final fun with2Receivers(@org.jetbrains.annotations.NotNull $this$with2Receivers: java.lang.String, @org.jetbrains.annotations.NotNull a: int, @org.jetbrains.annotations.NotNull b: float) : void {
|
||||||
|
}
|
||||||
|
public fun A() = UastEmptyExpression
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Parent {
|
||||||
|
public fun Parent(@org.jetbrains.annotations.NotNull a: java.lang.String, @org.jetbrains.annotations.NotNull b: int) = UastEmptyExpression
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = ParametersWithDefaultValuesKt)
|
||||||
|
UMethod (name = foo)
|
||||||
|
UParameter (name = a)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = b)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = c)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
ULiteralExpression (value = 0)
|
||||||
|
UParameter (name = flag)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
ULiteralExpression (value = false)
|
||||||
|
UBlockExpression
|
||||||
+4
@@ -0,0 +1,4 @@
|
|||||||
|
public final class ParametersWithDefaultValuesKt {
|
||||||
|
public static final fun foo(@org.jetbrains.annotations.NotNull a: int, @org.jetbrains.annotations.NotNull b: java.lang.String, @org.jetbrains.annotations.NotNull c: int, @org.jetbrains.annotations.NotNull flag: boolean) : void {
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
class PropertyTest {
|
|
||||||
var stringRepresentation: String
|
|
||||||
get() = this.toString()
|
|
||||||
set(value) {
|
|
||||||
setDataFromString(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun setDataFromString(data: String) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
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, resolvesTo = null)
|
||||||
|
ULambdaExpression
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
ULiteralExpression (value = "/sdcard")
|
||||||
|
UField (name = annotatedDelegate$delegate)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UAnnotation (fqName = kotlin.Suppress)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (lazy))
|
||||||
|
USimpleNameReferenceExpression (identifier = lazy, resolvesTo = null)
|
||||||
|
ULambdaExpression
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
UBinaryExpression (operator = +)
|
||||||
|
ULiteralExpression (value = 1)
|
||||||
|
ULiteralExpression (value = 1)
|
||||||
|
UMethod (name = getSdCardPath)
|
||||||
|
UMethod (name = localPropertyTest)
|
||||||
|
UBlockExpression
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = sdCardPathLocal)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (lazy))
|
||||||
|
USimpleNameReferenceExpression (identifier = lazy, resolvesTo = null)
|
||||||
|
ULambdaExpression
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
ULiteralExpression (value = "/sdcard")
|
||||||
|
UMethod (name = getAnnotatedDelegate)
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
public final class PropertyDelegateKt {
|
||||||
|
@org.jetbrains.annotations.NotNull private static final var sdCardPath$delegate: kotlin.Lazy
|
||||||
|
@org.jetbrains.annotations.NotNull @kotlin.Suppress private static final var annotatedDelegate$delegate: kotlin.Lazy
|
||||||
|
public static final fun getSdCardPath() : java.lang.String = UastEmptyExpression
|
||||||
|
public static final fun localPropertyTest() : void {
|
||||||
|
var sdCardPathLocal: java.lang.String
|
||||||
|
}
|
||||||
|
public static final fun getAnnotatedDelegate() : int = UastEmptyExpression
|
||||||
|
}
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
class TestPropertyInitializer {
|
|
||||||
var withSetter = "/sdcard"
|
|
||||||
get() = field
|
|
||||||
set(p) {
|
|
||||||
field = p
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+12
@@ -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)
|
||||||
+7
@@ -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,82 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = PropertyReferencesKt)
|
||||||
|
UMethod (name = properties)
|
||||||
|
UBlockExpression
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = a)
|
||||||
|
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (A))
|
||||||
|
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = PsiClass: A)
|
||||||
|
ULiteralExpression (value = 17)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = x)
|
||||||
|
UPrefixExpression (operator = -)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = a)
|
||||||
|
USimpleNameReferenceExpression (identifier = mutableProp)
|
||||||
|
UBinaryExpression (operator = =)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = a)
|
||||||
|
USimpleNameReferenceExpression (identifier = mutableProp)
|
||||||
|
ULiteralExpression (value = 1)
|
||||||
|
UBinaryExpression (operator = +=)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = a)
|
||||||
|
USimpleNameReferenceExpression (identifier = mutableProp)
|
||||||
|
USimpleNameReferenceExpression (identifier = x)
|
||||||
|
UPrefixExpression (operator = ++)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = a)
|
||||||
|
USimpleNameReferenceExpression (identifier = mutableProp)
|
||||||
|
UPostfixExpression (operator = --)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = a)
|
||||||
|
USimpleNameReferenceExpression (identifier = mutableProp)
|
||||||
|
UMethod (name = ext)
|
||||||
|
UParameter (name = $this$ext)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = x)
|
||||||
|
UPrefixExpression (operator = -)
|
||||||
|
USimpleNameReferenceExpression (identifier = mutableProp)
|
||||||
|
UBinaryExpression (operator = =)
|
||||||
|
USimpleNameReferenceExpression (identifier = mutableProp)
|
||||||
|
ULiteralExpression (value = 1)
|
||||||
|
UBinaryExpression (operator = +=)
|
||||||
|
USimpleNameReferenceExpression (identifier = mutableProp)
|
||||||
|
USimpleNameReferenceExpression (identifier = x)
|
||||||
|
UPrefixExpression (operator = ++)
|
||||||
|
USimpleNameReferenceExpression (identifier = mutableProp)
|
||||||
|
UPostfixExpression (operator = --)
|
||||||
|
USimpleNameReferenceExpression (identifier = mutableProp)
|
||||||
|
UClass (name = A)
|
||||||
|
UField (name = privateProp)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
ULiteralExpression (value = 0)
|
||||||
|
UField (name = mutableProp)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UMethod (name = getMutableProp)
|
||||||
|
UMethod (name = setMutableProp)
|
||||||
|
UParameter (name = mutableProp)
|
||||||
|
UAnnotation (fqName = null)
|
||||||
|
UMethod (name = add)
|
||||||
|
UParameter (name = x)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = result)
|
||||||
|
USimpleNameReferenceExpression (identifier = privateProp)
|
||||||
|
UBinaryExpression (operator = =)
|
||||||
|
USimpleNameReferenceExpression (identifier = privateProp)
|
||||||
|
USimpleNameReferenceExpression (identifier = x)
|
||||||
|
UReturnExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = privateProp)
|
||||||
|
UMethod (name = A)
|
||||||
|
UParameter (name = init)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UBlockExpression
|
||||||
|
UBinaryExpression (operator = =)
|
||||||
|
USimpleNameReferenceExpression (identifier = mutableProp)
|
||||||
|
USimpleNameReferenceExpression (identifier = init)
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
public final class PropertyReferencesKt {
|
||||||
|
public static final fun properties() : void {
|
||||||
|
var a: A = <init>(17)
|
||||||
|
var x: int = -a.mutableProp
|
||||||
|
a.mutableProp = 1
|
||||||
|
a.mutableProp += x
|
||||||
|
++a.mutableProp
|
||||||
|
a.mutableProp--
|
||||||
|
}
|
||||||
|
public static final fun ext(@org.jetbrains.annotations.NotNull $this$ext: A) : void {
|
||||||
|
var x: int = -mutableProp
|
||||||
|
mutableProp = 1
|
||||||
|
mutableProp += x
|
||||||
|
++mutableProp
|
||||||
|
mutableProp--
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class A {
|
||||||
|
@org.jetbrains.annotations.NotNull private var privateProp: int = 0
|
||||||
|
@org.jetbrains.annotations.NotNull private var mutableProp: int
|
||||||
|
public final fun getMutableProp() : int = UastEmptyExpression
|
||||||
|
public final fun setMutableProp(@null mutableProp: int) : void = UastEmptyExpression
|
||||||
|
public final fun add(@org.jetbrains.annotations.NotNull x: int) : int {
|
||||||
|
var result: int = privateProp
|
||||||
|
privateProp = x
|
||||||
|
return privateProp
|
||||||
|
}
|
||||||
|
public fun A(@org.jetbrains.annotations.NotNull init: int) {
|
||||||
|
{
|
||||||
|
mutableProp = init
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = PropertyWithAnnotationKt)
|
||||||
|
UField (name = prop1)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UAnnotation (fqName = TestAnnotation)
|
||||||
|
ULiteralExpression (value = 0)
|
||||||
|
UField (name = prop3)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
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)
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
public final class PropertyWithAnnotationKt {
|
||||||
|
@org.jetbrains.annotations.NotNull @TestAnnotation private static final var prop1: int = 0
|
||||||
|
@org.jetbrains.annotations.NotNull private static var prop3: 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 {
|
||||||
|
}
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
UFile (package = A.B.C)
|
||||||
|
UClass (name = Foo)
|
||||||
|
UMethod (name = Foo)
|
||||||
|
UClass (name = Bar)
|
||||||
|
UMethod (name = getFoo)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = A)
|
||||||
|
USimpleNameReferenceExpression (identifier = B)
|
||||||
|
USimpleNameReferenceExpression (identifier = C)
|
||||||
|
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (Foo))
|
||||||
|
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = PsiClass: Foo)
|
||||||
|
UMethod (name = Bar)
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package A.B.C
|
||||||
|
|
||||||
|
public final class Foo {
|
||||||
|
public fun Foo() = UastEmptyExpression
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class Bar {
|
||||||
|
public final fun getFoo() : A.B.C.Foo {
|
||||||
|
return A.B.C.<init>()
|
||||||
|
}
|
||||||
|
public fun Bar() = UastEmptyExpression
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = ReceiverFunKt)
|
||||||
|
UMethod (name = foo)
|
||||||
|
UParameter (name = $this$foo)
|
||||||
|
UAnnotation (fqName = MyReceiverAnnotation)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UThisExpression (label = null)
|
||||||
|
USimpleNameReferenceExpression (identifier = length)
|
||||||
|
UMethod (name = getRx)
|
||||||
|
UParameter (name = $this$getRx)
|
||||||
|
UAnnotation (fqName = MyReceiverAnnotation)
|
||||||
|
UNamedExpression (name = name)
|
||||||
|
ULiteralExpression (value = "RegExp")
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (toRegex))
|
||||||
|
USimpleNameReferenceExpression (identifier = toRegex, resolvesTo = null)
|
||||||
|
UClass (name = MyReceiverAnnotation)
|
||||||
|
UAnnotationMethod (name = name)
|
||||||
|
ULiteralExpression (value = "")
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
public final class ReceiverFunKt {
|
||||||
|
public static final fun foo(@MyReceiverAnnotation @org.jetbrains.annotations.NotNull $this$foo: java.lang.String) : int {
|
||||||
|
return this.length
|
||||||
|
}
|
||||||
|
public static final fun getRx(@MyReceiverAnnotation(name = "RegExp") @org.jetbrains.annotations.NotNull $this$getRx: java.lang.String) : kotlin.text.Regex {
|
||||||
|
return toRegex()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract annotation MyReceiverAnnotation {
|
||||||
|
public abstract fun name() : java.lang.String = UastEmptyExpression
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
UFile (package = test.pkg)
|
||||||
|
UClass (name = ReifiedKt)
|
||||||
|
UMethod (name = systemService2)
|
||||||
|
UParameter (name = $this$systemService2)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (getSystemService))
|
||||||
|
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UClassLiteralExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = java)
|
||||||
|
UMethod (name = systemService1)
|
||||||
|
UParameter (name = $this$systemService1)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (getSystemService))
|
||||||
|
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UClassLiteralExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = java)
|
||||||
|
UClass (name = Context)
|
||||||
|
UMethod (name = ownSystemService2)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (getSystemService))
|
||||||
|
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UClassLiteralExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = java)
|
||||||
|
UMethod (name = Context)
|
||||||
|
UMethod (name = ownSystemService1)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (getSystemService))
|
||||||
|
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UClassLiteralExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = java)
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package test.pkg
|
||||||
|
|
||||||
|
public final class ReifiedKt {
|
||||||
|
public static final fun systemService2(@org.jetbrains.annotations.NotNull $this$systemService2: test.pkg.Context) : error.NonExistentClass {
|
||||||
|
return <anonymous class>(java.lang.String.java)
|
||||||
|
}
|
||||||
|
static fun systemService1(@org.jetbrains.annotations.NotNull $this$systemService1: test.pkg.Context) : <ErrorType> {
|
||||||
|
return <anonymous class>(T.java)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class Context {
|
||||||
|
public final fun ownSystemService2() : error.NonExistentClass {
|
||||||
|
return <anonymous class>(java.lang.String.java)
|
||||||
|
}
|
||||||
|
public fun Context() = UastEmptyExpression
|
||||||
|
fun ownSystemService1() : <ErrorType> {
|
||||||
|
return <anonymous class>(T.java)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = ReifiedParametersKt)
|
||||||
|
UMethod (name = functionWithLambda)
|
||||||
|
UParameter (name = t)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UParameter (name = process)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (process))
|
||||||
|
USimpleNameReferenceExpression (identifier = invoke, resolvesTo = null)
|
||||||
|
USimpleNameReferenceExpression (identifier = t)
|
||||||
|
UMethod (name = functionWithVararg)
|
||||||
|
UParameter (name = i)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UParameter (name = t)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
UArrayAccessExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = t)
|
||||||
|
ULiteralExpression (value = 0)
|
||||||
|
UMethod (name = functionWithReceiver)
|
||||||
|
UParameter (name = $this$functionWithReceiver)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UParameter (name = i)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
UThisExpression (label = null)
|
||||||
|
UMethod (name = name with spaces)
|
||||||
|
UParameter (name = $this$name with spaces)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UParameter (name = i)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
UThisExpression (label = null)
|
||||||
|
UMethod (name = functionWithParamAnnotation)
|
||||||
|
UParameter (name = t)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UAnnotation (fqName = kotlin.Suppress)
|
||||||
|
UNamedExpression (name = names)
|
||||||
|
ULiteralExpression (value = "s")
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = t)
|
||||||
|
UMethod (name = functionUnresolved)
|
||||||
|
UParameter (name = t)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UAnnotation (fqName = kotlin.Suppress)
|
||||||
|
UNamedExpression (name = names)
|
||||||
|
ULiteralExpression (value = "s")
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = t)
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
public final class ReifiedParametersKt {
|
||||||
|
static fun functionWithLambda(@org.jetbrains.annotations.Nullable t: T, @org.jetbrains.annotations.NotNull process: kotlin.jvm.functions.Function1<? super T,? extends java.lang.Integer>) : int {
|
||||||
|
return invoke(t)
|
||||||
|
}
|
||||||
|
static fun functionWithVararg(@org.jetbrains.annotations.Nullable i: int, @org.jetbrains.annotations.Nullable t: T) : T {
|
||||||
|
return t[0]
|
||||||
|
}
|
||||||
|
static fun functionWithReceiver(@org.jetbrains.annotations.Nullable $this$functionWithReceiver: T, @org.jetbrains.annotations.Nullable i: int) : T {
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
static fun name with spaces(@org.jetbrains.annotations.Nullable $this$name with spaces: T, @org.jetbrains.annotations.Nullable i: int) : T {
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
static fun functionWithParamAnnotation(@org.jetbrains.annotations.Nullable @kotlin.Suppress(names = "s") t: T) : T {
|
||||||
|
return t
|
||||||
|
}
|
||||||
|
static fun functionUnresolved(@org.jetbrains.annotations.NotNull @kotlin.Suppress(names = "s") t: <ErrorType>) : T {
|
||||||
|
return t
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = ReifiedResolveKt)
|
||||||
|
UMethod (name = bar)
|
||||||
|
UParameter (name = init)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
ULambdaExpression
|
||||||
|
UBlockExpression
|
||||||
|
UBlockExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (TODO))
|
||||||
|
USimpleNameReferenceExpression (identifier = TODO, resolvesTo = null)
|
||||||
|
ULiteralExpression (value = "message")
|
||||||
|
UMethod (name = resolve)
|
||||||
|
UBlockExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (foo))
|
||||||
|
USimpleNameReferenceExpression (identifier = foo, resolvesTo = null)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = x)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (foo))
|
||||||
|
USimpleNameReferenceExpression (identifier = foo, resolvesTo = null)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (bar))
|
||||||
|
USimpleNameReferenceExpression (identifier = bar, resolvesTo = null)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = y)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (bar))
|
||||||
|
USimpleNameReferenceExpression (identifier = bar, resolvesTo = null)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = z)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (listOf))
|
||||||
|
USimpleNameReferenceExpression (identifier = listOf, resolvesTo = null)
|
||||||
|
ULiteralExpression (value = "foo")
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (filterIsInstance))
|
||||||
|
USimpleNameReferenceExpression (identifier = filterIsInstance, resolvesTo = null)
|
||||||
|
UMethod (name = foo)
|
||||||
|
UParameter (name = init)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
ULambdaExpression
|
||||||
|
UBlockExpression
|
||||||
|
UBlockExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (TODO))
|
||||||
|
USimpleNameReferenceExpression (identifier = TODO, resolvesTo = null)
|
||||||
|
ULiteralExpression (value = "message")
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
public final class ReifiedResolveKt {
|
||||||
|
public static final fun bar(@org.jetbrains.annotations.NotNull init: kotlin.jvm.functions.Function1<? super T,kotlin.Unit>) : T {
|
||||||
|
TODO("message")
|
||||||
|
}
|
||||||
|
public static final fun resolve() : void {
|
||||||
|
foo()
|
||||||
|
var x: java.lang.String = foo()
|
||||||
|
bar()
|
||||||
|
var y: java.lang.String = bar()
|
||||||
|
var z: java.util.List<? extends java.lang.String> = listOf("foo").filterIsInstance()
|
||||||
|
}
|
||||||
|
static fun foo(@org.jetbrains.annotations.NotNull init: kotlin.jvm.functions.Function1<? super T,? extends kotlin.Unit>) : T {
|
||||||
|
TODO("message")
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,163 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = ReifiedReturnTypeKt)
|
||||||
|
UMethod (name = function1)
|
||||||
|
UParameter (name = t)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UParameter (name = i)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = s)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UMethod (name = function2)
|
||||||
|
UParameter (name = t)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UParameter (name = i)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = s)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = t)
|
||||||
|
UMethod (name = function2CharSequence)
|
||||||
|
UParameter (name = t)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = i)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = s)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = t)
|
||||||
|
UMethod (name = copyWhenGreater)
|
||||||
|
UParameter (name = list)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = threshold)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = threshold2)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = threshold2)
|
||||||
|
UMethod (name = function3)
|
||||||
|
UParameter (name = t)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UParameter (name = i)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = s)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UMethod (name = function4)
|
||||||
|
UParameter (name = t)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UParameter (name = i)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = s)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = t)
|
||||||
|
UMethod (name = function5)
|
||||||
|
UParameter (name = t)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UParameter (name = i)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = s)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
ULiteralExpression (value = 42)
|
||||||
|
UMethod (name = function6)
|
||||||
|
UParameter (name = $this$function6)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UParameter (name = t)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UParameter (name = i)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = s)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = t)
|
||||||
|
UMethod (name = function7)
|
||||||
|
UParameter (name = t)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UParameter (name = i)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = s)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = t)
|
||||||
|
UMethod (name = function8)
|
||||||
|
UParameter (name = t)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UParameter (name = i)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = s)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = t)
|
||||||
|
UMethod (name = function9)
|
||||||
|
UParameter (name = t)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UParameter (name = i)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = s)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = t)
|
||||||
|
UMethod (name = function10)
|
||||||
|
UParameter (name = t)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UParameter (name = i)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = s)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = t)
|
||||||
|
UMethod (name = function11)
|
||||||
|
UParameter (name = $this$function11)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UParameter (name = t)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.Nullable)
|
||||||
|
UParameter (name = i)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = s)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = t)
|
||||||
|
UMethod (name = function11CharSequence)
|
||||||
|
UParameter (name = $this$function11CharSequence)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = t)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = i)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = s)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = t)
|
||||||
|
UMethod (name = function12CharSequence)
|
||||||
|
UParameter (name = $this$function12CharSequence)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = t)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = i)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UParameter (name = s)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = t)
|
||||||
|
UClass (name = Foo)
|
||||||
|
UMethod (name = Foo)
|
||||||
|
UMethod (name = foo)
|
||||||
|
UBlockExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (TODO))
|
||||||
|
USimpleNameReferenceExpression (identifier = TODO, resolvesTo = null)
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
public final class ReifiedReturnTypeKt {
|
||||||
|
public static final fun function1(@org.jetbrains.annotations.Nullable t: T, @org.jetbrains.annotations.NotNull i: int, @org.jetbrains.annotations.NotNull s: java.lang.String) : void {
|
||||||
|
}
|
||||||
|
public static final fun function2(@org.jetbrains.annotations.Nullable t: T, @org.jetbrains.annotations.NotNull i: int, @org.jetbrains.annotations.NotNull s: java.lang.String) : T {
|
||||||
|
return t
|
||||||
|
}
|
||||||
|
public static final fun function2CharSequence(@org.jetbrains.annotations.NotNull t: T, @org.jetbrains.annotations.NotNull i: int, @org.jetbrains.annotations.NotNull s: java.lang.String) : T {
|
||||||
|
return t
|
||||||
|
}
|
||||||
|
public static final fun copyWhenGreater(@org.jetbrains.annotations.NotNull list: java.util.List<? extends T>, @org.jetbrains.annotations.NotNull threshold: T, @org.jetbrains.annotations.NotNull threshold2: B) : B {
|
||||||
|
return threshold2
|
||||||
|
}
|
||||||
|
static fun function3(@org.jetbrains.annotations.Nullable t: T, @org.jetbrains.annotations.NotNull i: int, @org.jetbrains.annotations.NotNull s: java.lang.String) : void {
|
||||||
|
}
|
||||||
|
static fun function4(@org.jetbrains.annotations.Nullable t: T, @org.jetbrains.annotations.NotNull i: int, @org.jetbrains.annotations.NotNull s: java.lang.String) : T {
|
||||||
|
return t
|
||||||
|
}
|
||||||
|
static fun function5(@org.jetbrains.annotations.Nullable t: T, @org.jetbrains.annotations.NotNull i: int, @org.jetbrains.annotations.NotNull s: java.lang.String) : int {
|
||||||
|
return 42
|
||||||
|
}
|
||||||
|
static fun function6(@org.jetbrains.annotations.Nullable $this$function6: T, @org.jetbrains.annotations.Nullable t: T, @org.jetbrains.annotations.NotNull i: int, @org.jetbrains.annotations.NotNull s: java.lang.String) : T {
|
||||||
|
return t
|
||||||
|
}
|
||||||
|
static fun function7(@org.jetbrains.annotations.Nullable t: T, @org.jetbrains.annotations.NotNull i: int, @org.jetbrains.annotations.NotNull s: java.lang.String) : T {
|
||||||
|
return t
|
||||||
|
}
|
||||||
|
static fun function8(@org.jetbrains.annotations.Nullable t: T, @org.jetbrains.annotations.NotNull i: int, @org.jetbrains.annotations.NotNull s: java.lang.String) : T {
|
||||||
|
return t
|
||||||
|
}
|
||||||
|
static fun function9(@org.jetbrains.annotations.Nullable t: T, @org.jetbrains.annotations.NotNull i: int, @org.jetbrains.annotations.NotNull s: java.lang.String) : T {
|
||||||
|
return t
|
||||||
|
}
|
||||||
|
static fun function10(@org.jetbrains.annotations.Nullable t: T, @org.jetbrains.annotations.NotNull i: int, @org.jetbrains.annotations.NotNull s: java.lang.String) : T {
|
||||||
|
return t
|
||||||
|
}
|
||||||
|
static fun function11(@org.jetbrains.annotations.Nullable $this$function11: T, @org.jetbrains.annotations.Nullable t: T, @org.jetbrains.annotations.NotNull i: int, @org.jetbrains.annotations.NotNull s: java.lang.String) : T {
|
||||||
|
return t
|
||||||
|
}
|
||||||
|
static fun function11CharSequence(@org.jetbrains.annotations.NotNull $this$function11CharSequence: T, @org.jetbrains.annotations.NotNull t: T, @org.jetbrains.annotations.NotNull i: int, @org.jetbrains.annotations.NotNull s: java.lang.String) : T {
|
||||||
|
return t
|
||||||
|
}
|
||||||
|
static fun function12CharSequence(@org.jetbrains.annotations.NotNull $this$function12CharSequence: T, @org.jetbrains.annotations.NotNull t: B, @org.jetbrains.annotations.NotNull i: T, @org.jetbrains.annotations.NotNull s: java.lang.String) : B {
|
||||||
|
return t
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class Foo {
|
||||||
|
public fun Foo() = UastEmptyExpression
|
||||||
|
fun foo() : Z {
|
||||||
|
TODO()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,147 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UClass (name = ResolveKt)
|
||||||
|
UMethod (name = bar)
|
||||||
|
UBlockExpression
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (A))
|
||||||
|
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = PsiClass: A)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (foo))
|
||||||
|
USimpleNameReferenceExpression (identifier = foo, resolvesTo = null)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (A))
|
||||||
|
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = PsiClass: A)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (inlineFoo))
|
||||||
|
USimpleNameReferenceExpression (identifier = inlineFoo, resolvesTo = null)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (listOf))
|
||||||
|
USimpleNameReferenceExpression (identifier = listOf, resolvesTo = null)
|
||||||
|
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (A))
|
||||||
|
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = PsiClass: A)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (forEach))
|
||||||
|
USimpleNameReferenceExpression (identifier = forEach, resolvesTo = null)
|
||||||
|
ULambdaExpression
|
||||||
|
UParameter (name = it)
|
||||||
|
UBlockExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (println))
|
||||||
|
USimpleNameReferenceExpression (identifier = println, resolvesTo = null)
|
||||||
|
USimpleNameReferenceExpression (identifier = it)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (listOf))
|
||||||
|
USimpleNameReferenceExpression (identifier = listOf, resolvesTo = null)
|
||||||
|
ULiteralExpression (value = "")
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (joinToString))
|
||||||
|
USimpleNameReferenceExpression (identifier = joinToString, resolvesTo = null)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (listOf))
|
||||||
|
USimpleNameReferenceExpression (identifier = listOf, resolvesTo = null)
|
||||||
|
ULiteralExpression (value = "")
|
||||||
|
USimpleNameReferenceExpression (identifier = size)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (listOf))
|
||||||
|
USimpleNameReferenceExpression (identifier = listOf, resolvesTo = null)
|
||||||
|
ULiteralExpression (value = "")
|
||||||
|
USimpleNameReferenceExpression (identifier = indices)
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = date)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = java)
|
||||||
|
USimpleNameReferenceExpression (identifier = util)
|
||||||
|
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (Date))
|
||||||
|
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = PsiClass: Date)
|
||||||
|
UBinaryExpression (operator = =)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = date)
|
||||||
|
USimpleNameReferenceExpression (identifier = time)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (time))
|
||||||
|
ULiteralExpression (value = 1000)
|
||||||
|
ULiteralExpression (value = 1000)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (listOf))
|
||||||
|
USimpleNameReferenceExpression (identifier = listOf, resolvesTo = null)
|
||||||
|
ULiteralExpression (value = "")
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (last))
|
||||||
|
USimpleNameReferenceExpression (identifier = last, resolvesTo = null)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (mutableMapOf))
|
||||||
|
USimpleNameReferenceExpression (identifier = mutableMapOf, resolvesTo = null)
|
||||||
|
UBinaryExpression (operator = <other>)
|
||||||
|
ULiteralExpression (value = 1)
|
||||||
|
ULiteralExpression (value = "1")
|
||||||
|
USimpleNameReferenceExpression (identifier = entries)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (first))
|
||||||
|
USimpleNameReferenceExpression (identifier = first, resolvesTo = null)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (setValue))
|
||||||
|
USimpleNameReferenceExpression (identifier = setValue, resolvesTo = null)
|
||||||
|
ULiteralExpression (value = "123")
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = intRange)
|
||||||
|
UBinaryExpression (operator = ..)
|
||||||
|
ULiteralExpression (value = 0)
|
||||||
|
ULiteralExpression (value = 3)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = intRange)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (contains))
|
||||||
|
USimpleNameReferenceExpression (identifier = contains, resolvesTo = null)
|
||||||
|
UBinaryExpressionWithType
|
||||||
|
ULiteralExpression (value = 2)
|
||||||
|
UTypeReferenceExpression (name = int)
|
||||||
|
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 2))
|
||||||
|
UIdentifier (Identifier (IntRange))
|
||||||
|
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = PsiClass: IntRange)
|
||||||
|
ULiteralExpression (value = 1)
|
||||||
|
ULiteralExpression (value = 2)
|
||||||
|
UMethod (name = barT)
|
||||||
|
UParameter (name = t)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = t)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (foo))
|
||||||
|
USimpleNameReferenceExpression (identifier = foo, resolvesTo = null)
|
||||||
|
UMethod (name = barTL)
|
||||||
|
UParameter (name = listT)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = listT)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (isEmpty))
|
||||||
|
USimpleNameReferenceExpression (identifier = isEmpty, resolvesTo = null)
|
||||||
|
UForEachExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = listT)
|
||||||
|
UBlockExpression
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = a)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (foo))
|
||||||
|
USimpleNameReferenceExpression (identifier = foo, resolvesTo = null)
|
||||||
|
UClass (name = A)
|
||||||
|
UMethod (name = foo)
|
||||||
|
UBlockExpression
|
||||||
|
UMethod (name = inlineFoo)
|
||||||
|
UBlockExpression
|
||||||
|
UMethod (name = A)
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
public final class ResolveKt {
|
||||||
|
public static final fun bar() : void {
|
||||||
|
<init>().foo()
|
||||||
|
<init>().inlineFoo()
|
||||||
|
listOf(<init>()).forEach({ var it: A ->
|
||||||
|
|
||||||
|
println(it)
|
||||||
|
})
|
||||||
|
listOf("").joinToString()
|
||||||
|
listOf("").size
|
||||||
|
listOf("").indices
|
||||||
|
var date: java.util.Date = java.util.<init>()
|
||||||
|
date.time = 1000
|
||||||
|
listOf("").last()
|
||||||
|
mutableMapOf(1 <other> "1").entries.first().setValue("123")
|
||||||
|
var intRange: kotlin.ranges.LongRange = 0 .. 3
|
||||||
|
intRange.contains(2 as int)
|
||||||
|
<init>(1, 2)
|
||||||
|
}
|
||||||
|
public static final fun barT(@org.jetbrains.annotations.NotNull t: T) : void {
|
||||||
|
t.foo()
|
||||||
|
}
|
||||||
|
public static final fun barTL(@org.jetbrains.annotations.NotNull listT: T) : void {
|
||||||
|
listT.isEmpty()
|
||||||
|
for (a : listT) {
|
||||||
|
a.foo()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class A {
|
||||||
|
public final fun foo() : void {
|
||||||
|
}
|
||||||
|
public final fun inlineFoo() : void {
|
||||||
|
}
|
||||||
|
public fun A() = UastEmptyExpression
|
||||||
|
}
|
||||||
@@ -0,0 +1,126 @@
|
|||||||
|
UFile (package = )
|
||||||
|
UImportStatement (isOnDemand = false)
|
||||||
|
UImportStatement (isOnDemand = false)
|
||||||
|
UImportStatement (isOnDemand = false)
|
||||||
|
UImportStatement (isOnDemand = false)
|
||||||
|
UClass (name = SAMKt)
|
||||||
|
UField (name = notSam)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
ULambdaExpression
|
||||||
|
UBlockExpression
|
||||||
|
UField (name = foo)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
ULambdaExpression
|
||||||
|
UBlockExpression
|
||||||
|
UField (name = baz)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
UQualifiedReferenceExpression
|
||||||
|
USimpleNameReferenceExpression (identifier = java)
|
||||||
|
USimpleNameReferenceExpression (identifier = lang)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (Runnable))
|
||||||
|
USimpleNameReferenceExpression (identifier = Runnable, resolvesTo = PsiClass: Runnable)
|
||||||
|
ULambdaExpression
|
||||||
|
UBlockExpression
|
||||||
|
UMethod (name = getNotSam)
|
||||||
|
UMethod (name = getFoo)
|
||||||
|
UMethod (name = setFoo)
|
||||||
|
UParameter (name = foo)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UMethod (name = bar)
|
||||||
|
UBlockExpression
|
||||||
|
UBinaryExpression (operator = =)
|
||||||
|
USimpleNameReferenceExpression (identifier = foo)
|
||||||
|
ULambdaExpression
|
||||||
|
UBlockExpression
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = a)
|
||||||
|
UBinaryExpressionWithType
|
||||||
|
ULambdaExpression
|
||||||
|
UBlockExpression
|
||||||
|
UTypeReferenceExpression (name = java.lang.Runnable)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (runRunnable))
|
||||||
|
USimpleNameReferenceExpression (identifier = runRunnable, resolvesTo = null)
|
||||||
|
ULambdaExpression
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
ULambdaExpression
|
||||||
|
UBlockExpression
|
||||||
|
UMethod (name = getBaz)
|
||||||
|
UMethod (name = runRunnable)
|
||||||
|
UParameter (name = r)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (r))
|
||||||
|
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null)
|
||||||
|
UMethod (name = test1)
|
||||||
|
UBlockExpression
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = thread1)
|
||||||
|
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (Thread))
|
||||||
|
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = PsiClass: Thread)
|
||||||
|
ULambdaExpression
|
||||||
|
UBlockExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (println))
|
||||||
|
USimpleNameReferenceExpression (identifier = println, resolvesTo = null)
|
||||||
|
ULiteralExpression (value = "hello1")
|
||||||
|
UMethod (name = test2)
|
||||||
|
UBlockExpression
|
||||||
|
UDeclarationsExpression
|
||||||
|
ULocalVariable (name = thread2)
|
||||||
|
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (Thread))
|
||||||
|
USimpleNameReferenceExpression (identifier = <init>, resolvesTo = PsiClass: Thread)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (Runnable))
|
||||||
|
USimpleNameReferenceExpression (identifier = Runnable, resolvesTo = PsiClass: Runnable)
|
||||||
|
ULambdaExpression
|
||||||
|
UBlockExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (println))
|
||||||
|
USimpleNameReferenceExpression (identifier = println, resolvesTo = null)
|
||||||
|
ULiteralExpression (value = "hello2")
|
||||||
|
UMethod (name = test3)
|
||||||
|
UBlockExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (ambiguousSamAcceptor))
|
||||||
|
USimpleNameReferenceExpression (identifier = ambiguousSamAcceptor, resolvesTo = null)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (Supplier))
|
||||||
|
USimpleNameReferenceExpression (identifier = Supplier, resolvesTo = PsiClass: Supplier)
|
||||||
|
ULambdaExpression
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
ULiteralExpression (value = "Supplier")
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (ambiguousSamAcceptor))
|
||||||
|
USimpleNameReferenceExpression (identifier = ambiguousSamAcceptor, resolvesTo = null)
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1))
|
||||||
|
UIdentifier (Identifier (Callable))
|
||||||
|
USimpleNameReferenceExpression (identifier = Callable, resolvesTo = PsiClass: Callable)
|
||||||
|
ULambdaExpression
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
ULiteralExpression (value = "Callable")
|
||||||
|
UMethod (name = ambiguousSamAcceptor)
|
||||||
|
UParameter (name = s)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (TODO))
|
||||||
|
USimpleNameReferenceExpression (identifier = TODO, resolvesTo = null)
|
||||||
|
UMethod (name = ambiguousSamAcceptor)
|
||||||
|
UParameter (name = s)
|
||||||
|
UAnnotation (fqName = org.jetbrains.annotations.NotNull)
|
||||||
|
UBlockExpression
|
||||||
|
UReturnExpression
|
||||||
|
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||||
|
UIdentifier (Identifier (TODO))
|
||||||
|
USimpleNameReferenceExpression (identifier = TODO, resolvesTo = null)
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
import java.lang.Thread
|
||||||
|
import java.lang.Runnable
|
||||||
|
import java.util.concurrent.Callable
|
||||||
|
import java.util.function.Supplier
|
||||||
|
|
||||||
|
public final class SAMKt {
|
||||||
|
@org.jetbrains.annotations.NotNull private static final var notSam: kotlin.jvm.functions.Function0<kotlin.Unit> = {
|
||||||
|
|
||||||
|
}
|
||||||
|
@org.jetbrains.annotations.NotNull private static var foo: java.lang.Runnable = {
|
||||||
|
|
||||||
|
}
|
||||||
|
@org.jetbrains.annotations.NotNull private static final var baz: java.lang.Runnable = java.lang.Runnable({
|
||||||
|
|
||||||
|
})
|
||||||
|
public static final fun getNotSam() : kotlin.jvm.functions.Function0<kotlin.Unit> = UastEmptyExpression
|
||||||
|
public static final fun getFoo() : java.lang.Runnable = UastEmptyExpression
|
||||||
|
public static final fun setFoo(@org.jetbrains.annotations.NotNull foo: java.lang.Runnable) : void = UastEmptyExpression
|
||||||
|
public static final fun bar() : java.lang.Runnable {
|
||||||
|
foo = {
|
||||||
|
|
||||||
|
}
|
||||||
|
var a: java.lang.Runnable = {
|
||||||
|
|
||||||
|
} as java.lang.Runnable
|
||||||
|
runRunnable({
|
||||||
|
|
||||||
|
})
|
||||||
|
return {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static final fun getBaz() : java.lang.Runnable = UastEmptyExpression
|
||||||
|
public static final fun runRunnable(@org.jetbrains.annotations.NotNull r: java.lang.Runnable) : error.NonExistentClass {
|
||||||
|
return <anonymous class>()
|
||||||
|
}
|
||||||
|
public static final fun test1() : void {
|
||||||
|
var thread1: java.lang.Thread = <init>({
|
||||||
|
println("hello1")
|
||||||
|
})
|
||||||
|
}
|
||||||
|
public static final fun test2() : void {
|
||||||
|
var thread2: java.lang.Thread = <init>(Runnable({
|
||||||
|
println("hello2")
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
public static final fun test3() : void {
|
||||||
|
ambiguousSamAcceptor(Supplier({
|
||||||
|
return "Supplier"
|
||||||
|
}))
|
||||||
|
ambiguousSamAcceptor(Callable({
|
||||||
|
return "Callable"
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
public static final fun ambiguousSamAcceptor(@org.jetbrains.annotations.NotNull s: java.util.function.Supplier<java.lang.String>) : java.lang.String {
|
||||||
|
return TODO()
|
||||||
|
}
|
||||||
|
public static final fun ambiguousSamAcceptor(@org.jetbrains.annotations.NotNull s: java.util.concurrent.Callable<java.lang.String>) : java.lang.String {
|
||||||
|
return TODO()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
class Simple {
|
|
||||||
fun method() {
|
|
||||||
println("Hello, world!")
|
|
||||||
}
|
|
||||||
|
|
||||||
val property: String = "Mary"
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user