mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
KT UAST: always preserve receiver expression of class literal
...similar to dbaaeef (for callable reference).
This time, only receiver expression is discarded if type is resolvable.
Similarly, Java UAST counterpart has both information always.
GitOrigin-RevId: fd1aa3cccaa0d5063e1272ff6df32f7b3815c8ce
This commit is contained in:
committed by
intellij-monorepo-bot
parent
87949659cd
commit
07fab541fc
@@ -1,8 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
<problem>
|
||||
<file>TC.kt</file>
|
||||
<line>7</line>
|
||||
<description>Parameter <code>s</code> is not used</description>
|
||||
</problem>
|
||||
</problems>
|
||||
@@ -4,7 +4,7 @@ fun main() {
|
||||
|
||||
fun bar(
|
||||
i: Int,
|
||||
s: String // todo wrongly marked as unused
|
||||
s: String
|
||||
) {
|
||||
println("Foo $i")
|
||||
println(s::class.java)
|
||||
|
||||
@@ -13,6 +13,7 @@ class KotlinUClassLiteralExpression(
|
||||
) : KotlinAbstractUExpression(givenParent), UClassLiteralExpression, KotlinUElementWithType {
|
||||
|
||||
private val typePart = UastLazyPart<PsiType?>()
|
||||
private val expressionPart = UastLazyPart<UExpression?>()
|
||||
|
||||
override val type: PsiType?
|
||||
get() = typePart.getOrBuild {
|
||||
@@ -20,9 +21,8 @@ class KotlinUClassLiteralExpression(
|
||||
}
|
||||
|
||||
override val expression: UExpression?
|
||||
get() {
|
||||
if (type != null) return null
|
||||
val receiverExpression = sourcePsi.receiverExpression ?: return null
|
||||
get() = expressionPart.getOrBuild {
|
||||
val receiverExpression = sourcePsi.receiverExpression ?: return@getOrBuild null
|
||||
return baseResolveProviderService.baseKotlinConverter.convertExpression(receiverExpression, this, DEFAULT_EXPRESSION_TYPES_LIST)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ UFile (package = )
|
||||
UQualifiedReferenceExpression
|
||||
UQualifiedReferenceExpression
|
||||
UClassLiteralExpression
|
||||
USimpleNameReferenceExpression (identifier = base)
|
||||
USimpleNameReferenceExpression (identifier = java)
|
||||
USimpleNameReferenceExpression (identifier = genericSuperclass)
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0))
|
||||
|
||||
@@ -10,6 +10,7 @@ UFile (package = test.pkg)
|
||||
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null)
|
||||
UQualifiedReferenceExpression
|
||||
UClassLiteralExpression
|
||||
USimpleNameReferenceExpression (identifier = String)
|
||||
USimpleNameReferenceExpression (identifier = java)
|
||||
UMethod (name = systemService1)
|
||||
UParameter (name = $this$systemService1)
|
||||
@@ -21,6 +22,7 @@ UFile (package = test.pkg)
|
||||
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null)
|
||||
UQualifiedReferenceExpression
|
||||
UClassLiteralExpression
|
||||
USimpleNameReferenceExpression (identifier = T)
|
||||
USimpleNameReferenceExpression (identifier = java)
|
||||
UClass (name = Context)
|
||||
UMethod (name = ownSystemService2)
|
||||
@@ -31,6 +33,7 @@ UFile (package = test.pkg)
|
||||
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null)
|
||||
UQualifiedReferenceExpression
|
||||
UClassLiteralExpression
|
||||
USimpleNameReferenceExpression (identifier = String)
|
||||
USimpleNameReferenceExpression (identifier = java)
|
||||
UMethod (name = Context)
|
||||
UMethod (name = ownSystemService1)
|
||||
@@ -41,4 +44,5 @@ UFile (package = test.pkg)
|
||||
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null)
|
||||
UQualifiedReferenceExpression
|
||||
UClassLiteralExpression
|
||||
USimpleNameReferenceExpression (identifier = T)
|
||||
USimpleNameReferenceExpression (identifier = java)
|
||||
@@ -22,6 +22,7 @@ UFile (package = )
|
||||
USimpleNameReferenceExpression (identifier = crashMe, resolvesTo = null)
|
||||
UQualifiedReferenceExpression
|
||||
UClassLiteralExpression
|
||||
USimpleNameReferenceExpression (identifier = Callback)
|
||||
USimpleNameReferenceExpression (identifier = java)
|
||||
ULambdaExpression
|
||||
UBlockExpression
|
||||
|
||||
@@ -19,6 +19,7 @@ UFile (package = ) [import java.lang.reflect.ParameterizedType...]
|
||||
UQualifiedReferenceExpression [<ErrorType>.java.genericSuperclass] : PsiType:Type
|
||||
UQualifiedReferenceExpression [<ErrorType>.java] : PsiType:<ErrorType>
|
||||
UClassLiteralExpression [<ErrorType>] : PsiType:<ErrorType>
|
||||
USimpleNameReferenceExpression (identifier = base) [base] : PsiType:<ErrorType>
|
||||
USimpleNameReferenceExpression (identifier = java) [java] : PsiType:<ErrorType>
|
||||
USimpleNameReferenceExpression (identifier = genericSuperclass) [genericSuperclass] : PsiType:Type
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) [getGenericSuperclass()]
|
||||
|
||||
@@ -19,6 +19,7 @@ UFile (package = ) [import java.lang.reflect.ParameterizedType...]
|
||||
UQualifiedReferenceExpression [TypeBase<T>.java.genericSuperclass] : PsiType:Type
|
||||
UQualifiedReferenceExpression [TypeBase<T>.java] : PsiType:Class<? extends TypeBase<T>>
|
||||
UClassLiteralExpression [TypeBase<T>] : PsiType:KClass<? extends TypeBase<T>>
|
||||
USimpleNameReferenceExpression (identifier = base) [base] : PsiType:TypeBase<T>
|
||||
USimpleNameReferenceExpression (identifier = java) [java] : PsiType:Class<? extends TypeBase<T>>
|
||||
USimpleNameReferenceExpression (identifier = genericSuperclass) [genericSuperclass] : PsiType:Type
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) [getGenericSuperclass()]
|
||||
|
||||
@@ -10,6 +10,7 @@ UFile (package = test.pkg) [package test.pkg...]
|
||||
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null) [<anonymous class>]
|
||||
UQualifiedReferenceExpression [java.lang.String.java] : PsiType:Class<String>
|
||||
UClassLiteralExpression [java.lang.String] : PsiType:KClass<String>
|
||||
USimpleNameReferenceExpression (identifier = String) [String]
|
||||
USimpleNameReferenceExpression (identifier = java) [java] : PsiType:Class<String>
|
||||
UMethod (name = systemService1) [public static fun systemService1(@org.jetbrains.annotations.NotNull $this$systemService1: test.pkg.Context) : <ErrorType> {...}]
|
||||
UParameter (name = $this$systemService1) [@org.jetbrains.annotations.NotNull var $this$systemService1: test.pkg.Context]
|
||||
@@ -21,6 +22,7 @@ UFile (package = test.pkg) [package test.pkg...]
|
||||
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null) [<anonymous class>]
|
||||
UQualifiedReferenceExpression [T.java] : PsiType:Class<T>
|
||||
UClassLiteralExpression [T] : PsiType:KClass<T>
|
||||
USimpleNameReferenceExpression (identifier = T) [T]
|
||||
USimpleNameReferenceExpression (identifier = java) [java] : PsiType:Class<T>
|
||||
UClass (name = Context) [public final class Context {...}]
|
||||
UMethod (name = ownSystemService2) [public final fun ownSystemService2() : error.NonExistentClass {...}]
|
||||
@@ -31,6 +33,7 @@ UFile (package = test.pkg) [package test.pkg...]
|
||||
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null) [<anonymous class>]
|
||||
UQualifiedReferenceExpression [java.lang.String.java] : PsiType:Class<String>
|
||||
UClassLiteralExpression [java.lang.String] : PsiType:KClass<String>
|
||||
USimpleNameReferenceExpression (identifier = String) [String]
|
||||
USimpleNameReferenceExpression (identifier = java) [java] : PsiType:Class<String>
|
||||
UMethod (name = Context) [public fun Context() = UastEmptyExpression]
|
||||
UMethod (name = ownSystemService1) [public fun ownSystemService1() : <ErrorType> {...}]
|
||||
@@ -41,4 +44,5 @@ UFile (package = test.pkg) [package test.pkg...]
|
||||
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null) [<anonymous class>]
|
||||
UQualifiedReferenceExpression [T.java] : PsiType:Class<T>
|
||||
UClassLiteralExpression [T] : PsiType:KClass<T>
|
||||
USimpleNameReferenceExpression (identifier = T) [T]
|
||||
USimpleNameReferenceExpression (identifier = java) [java] : PsiType:Class<T>
|
||||
|
||||
@@ -10,6 +10,7 @@ UFile (package = test.pkg) [package test.pkg...]
|
||||
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null) [<anonymous class>] : PsiType:<ErrorType>
|
||||
UQualifiedReferenceExpression [java.lang.String.java] : PsiType:Class<String>
|
||||
UClassLiteralExpression [java.lang.String] : PsiType:KClass<String>
|
||||
USimpleNameReferenceExpression (identifier = String) [String] : PsiType:String
|
||||
USimpleNameReferenceExpression (identifier = java) [java] : PsiType:Class<String>
|
||||
UMethod (name = systemService1) [public static fun systemService1(@org.jetbrains.annotations.NotNull $this$systemService1: test.pkg.Context) : <ErrorType> {...}]
|
||||
UParameter (name = $this$systemService1) [@org.jetbrains.annotations.NotNull var $this$systemService1: test.pkg.Context]
|
||||
@@ -21,6 +22,7 @@ UFile (package = test.pkg) [package test.pkg...]
|
||||
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null) [<anonymous class>] : PsiType:<ErrorType>
|
||||
UQualifiedReferenceExpression [T.java] : PsiType:Class<T>
|
||||
UClassLiteralExpression [T] : PsiType:KClass<T>
|
||||
USimpleNameReferenceExpression (identifier = T) [T] : PsiType:T
|
||||
USimpleNameReferenceExpression (identifier = java) [java] : PsiType:Class<T>
|
||||
UClass (name = Context) [public final class Context {...}]
|
||||
UMethod (name = ownSystemService2) [public final fun ownSystemService2() : error.NonExistentClass {...}]
|
||||
@@ -31,6 +33,7 @@ UFile (package = test.pkg) [package test.pkg...]
|
||||
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null) [<anonymous class>] : PsiType:<ErrorType>
|
||||
UQualifiedReferenceExpression [java.lang.String.java] : PsiType:Class<String>
|
||||
UClassLiteralExpression [java.lang.String] : PsiType:KClass<String>
|
||||
USimpleNameReferenceExpression (identifier = String) [String] : PsiType:String
|
||||
USimpleNameReferenceExpression (identifier = java) [java] : PsiType:Class<String>
|
||||
UMethod (name = Context) [public fun Context() = UastEmptyExpression]
|
||||
UMethod (name = ownSystemService1) [public fun ownSystemService1() : <ErrorType> {...}]
|
||||
@@ -41,4 +44,5 @@ UFile (package = test.pkg) [package test.pkg...]
|
||||
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null) [<anonymous class>] : PsiType:<ErrorType>
|
||||
UQualifiedReferenceExpression [T.java] : PsiType:Class<T>
|
||||
UClassLiteralExpression [T] : PsiType:KClass<T>
|
||||
USimpleNameReferenceExpression (identifier = T) [T] : PsiType:T
|
||||
USimpleNameReferenceExpression (identifier = java) [java] : PsiType:Class<T>
|
||||
|
||||
@@ -22,6 +22,7 @@ UFile (package = ) [public abstract interface Callback {...]
|
||||
USimpleNameReferenceExpression (identifier = crashMe, resolvesTo = null) [crashMe] : PsiType:Unit
|
||||
UQualifiedReferenceExpression [Callback.java] : PsiType:Class<Callback>
|
||||
UClassLiteralExpression [Callback] : PsiType:KClass<Callback>
|
||||
USimpleNameReferenceExpression (identifier = Callback) [Callback]
|
||||
USimpleNameReferenceExpression (identifier = java) [java] : PsiType:Class<Callback>
|
||||
ULambdaExpression [{ ...}] : PsiType:Function0<? extends Callback>
|
||||
UBlockExpression [{...}]
|
||||
|
||||
@@ -22,6 +22,7 @@ UFile (package = ) [public abstract interface Callback {...]
|
||||
USimpleNameReferenceExpression (identifier = crashMe, resolvesTo = null) [crashMe] : PsiType:Unit
|
||||
UQualifiedReferenceExpression [Callback.java] : PsiType:Class<Callback>
|
||||
UClassLiteralExpression [Callback] : PsiType:KClass<Callback>
|
||||
USimpleNameReferenceExpression (identifier = Callback) [Callback] : PsiType:Callback
|
||||
USimpleNameReferenceExpression (identifier = java) [java] : PsiType:Class<Callback>
|
||||
ULambdaExpression [{ ...}] : PsiType:Function0<? extends Callback>
|
||||
UBlockExpression [{...}] : PsiType:Callback
|
||||
|
||||
@@ -19,6 +19,7 @@ UFile (package = ) [import java.lang.reflect.ParameterizedType...]
|
||||
UQualifiedReferenceExpression [<ErrorType>.java.genericSuperclass] = external genericSuperclass()
|
||||
UQualifiedReferenceExpression [<ErrorType>.java] = external java()
|
||||
UClassLiteralExpression [<ErrorType>] = <ErrorType>
|
||||
USimpleNameReferenceExpression (identifier = base) [base] = Undetermined
|
||||
USimpleNameReferenceExpression (identifier = java) [java] = external java()
|
||||
USimpleNameReferenceExpression (identifier = genericSuperclass) [genericSuperclass] = external genericSuperclass()
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) [getGenericSuperclass()] = external getGenericSuperclass()()
|
||||
|
||||
@@ -19,6 +19,7 @@ UFile (package = ) [import java.lang.reflect.ParameterizedType...]
|
||||
UQualifiedReferenceExpression [TypeBase<T>.java.genericSuperclass] = external genericSuperclass()
|
||||
UQualifiedReferenceExpression [TypeBase<T>.java] = external java()
|
||||
UClassLiteralExpression [TypeBase<T>] = TypeBase<T>
|
||||
USimpleNameReferenceExpression (identifier = base) [base] = Undetermined
|
||||
USimpleNameReferenceExpression (identifier = java) [java] = external java()
|
||||
USimpleNameReferenceExpression (identifier = genericSuperclass) [genericSuperclass] = external genericSuperclass()
|
||||
UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) [getGenericSuperclass()] = external getGenericSuperclass()()
|
||||
|
||||
@@ -10,6 +10,7 @@ UFile (package = test.pkg) [package test.pkg...]
|
||||
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null) [<anonymous class>] = external <anonymous class>(java.lang.String.java)(external java())
|
||||
UQualifiedReferenceExpression [java.lang.String.java] = external java()
|
||||
UClassLiteralExpression [java.lang.String] = java.lang.String
|
||||
USimpleNameReferenceExpression (identifier = String) [String] = external String()
|
||||
USimpleNameReferenceExpression (identifier = java) [java] = external java()
|
||||
UMethod (name = systemService1) [public static fun systemService1(@org.jetbrains.annotations.NotNull $this$systemService1: test.pkg.Context) : <ErrorType> {...}]
|
||||
UParameter (name = $this$systemService1) [@org.jetbrains.annotations.NotNull var $this$systemService1: test.pkg.Context]
|
||||
@@ -21,6 +22,7 @@ UFile (package = test.pkg) [package test.pkg...]
|
||||
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null) [<anonymous class>] = external <anonymous class>(T.java)(external java())
|
||||
UQualifiedReferenceExpression [T.java] = external java()
|
||||
UClassLiteralExpression [T] = T
|
||||
USimpleNameReferenceExpression (identifier = T) [T] = external T()
|
||||
USimpleNameReferenceExpression (identifier = java) [java] = external java()
|
||||
UClass (name = Context) [public final class Context {...}]
|
||||
UMethod (name = ownSystemService2) [public final fun ownSystemService2() : error.NonExistentClass {...}]
|
||||
@@ -31,6 +33,7 @@ UFile (package = test.pkg) [package test.pkg...]
|
||||
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null) [<anonymous class>] = external <anonymous class>(java.lang.String.java)(external java())
|
||||
UQualifiedReferenceExpression [java.lang.String.java] = external java()
|
||||
UClassLiteralExpression [java.lang.String] = java.lang.String
|
||||
USimpleNameReferenceExpression (identifier = String) [String] = external String()
|
||||
USimpleNameReferenceExpression (identifier = java) [java] = external java()
|
||||
UMethod (name = Context) [public fun Context() = UastEmptyExpression]
|
||||
UMethod (name = ownSystemService1) [public fun ownSystemService1() : <ErrorType> {...}]
|
||||
@@ -41,4 +44,5 @@ UFile (package = test.pkg) [package test.pkg...]
|
||||
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null) [<anonymous class>] = external <anonymous class>(T.java)(external java())
|
||||
UQualifiedReferenceExpression [T.java] = external java()
|
||||
UClassLiteralExpression [T] = T
|
||||
USimpleNameReferenceExpression (identifier = T) [T] = external T()
|
||||
USimpleNameReferenceExpression (identifier = java) [java] = external java()
|
||||
@@ -46,6 +46,7 @@ UFile (package = ) [public abstract interface Callback {...]
|
||||
})(external java(), Undetermined)
|
||||
UQualifiedReferenceExpression [Callback.java] = external java()
|
||||
UClassLiteralExpression [Callback] = Callback
|
||||
USimpleNameReferenceExpression (identifier = Callback) [Callback] = external Callback()
|
||||
USimpleNameReferenceExpression (identifier = java) [java] = external java()
|
||||
ULambdaExpression [{ ...}] = Undetermined
|
||||
UBlockExpression [{...}] = Nothing
|
||||
|
||||
@@ -3,6 +3,7 @@ UFile (package = ) [public final class ClassLiteralKt {...]
|
||||
UField (name = stringClass) [@org.jetbrains.annotations.NotNull private static final var stringClass: kotlin.reflect.KClass<java.lang.String> = java.lang.String]
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull) [@org.jetbrains.annotations.NotNull]
|
||||
UClassLiteralExpression [java.lang.String] : PsiType:KClass<String>
|
||||
USimpleNameReferenceExpression (identifier = String) [String]
|
||||
UMethod (name = getStringClass) [public static final fun getStringClass() : kotlin.reflect.KClass<java.lang.String> = UastEmptyExpression]
|
||||
UMethod (name = box) [public static final fun box() : java.lang.String {...}]
|
||||
UBlockExpression [{...}] : PsiType:Void
|
||||
@@ -13,6 +14,7 @@ UFile (package = ) [public final class ClassLiteralKt {...]
|
||||
UDeclarationsExpression [var xClass: kotlin.reflect.KClass<? extends java.lang.CharSequence> = java.lang.CharSequence]
|
||||
ULocalVariable (name = xClass) [var xClass: kotlin.reflect.KClass<? extends java.lang.CharSequence> = java.lang.CharSequence]
|
||||
UClassLiteralExpression [java.lang.CharSequence] : PsiType:KClass<? extends CharSequence>
|
||||
USimpleNameReferenceExpression (identifier = x) [x] : PsiType:CharSequence
|
||||
UReturnExpression [return if (xClass == stringClass) "OK" else xClass] : PsiType:Void
|
||||
UIfExpression [if (xClass == stringClass) "OK" else xClass] : PsiType:String
|
||||
UBinaryExpression (operator = ==) [xClass == stringClass] : PsiType:boolean
|
||||
@@ -38,7 +40,9 @@ UFile (package = ) [public final class ClassLiteralKt {...]
|
||||
UIfExpression [if (java.lang.Object != Foo) return false] : PsiType:Unit
|
||||
UBinaryExpression (operator = !=) [java.lang.Object != Foo] : PsiType:boolean
|
||||
UClassLiteralExpression [java.lang.Object] : PsiType:KClass<? extends Object>
|
||||
USimpleNameReferenceExpression (identifier = other) [other] : PsiType:Object
|
||||
UClassLiteralExpression [Foo] : PsiType:KClass<? extends Foo>
|
||||
UThisExpression (label = null) [this] : PsiType:Foo
|
||||
UReturnExpression [return false] : PsiType:Void
|
||||
ULiteralExpression (value = false) [false] : PsiType:boolean
|
||||
UReturnExpression [return s == (other as Foo).s] : PsiType:Void
|
||||
@@ -0,0 +1,60 @@
|
||||
UFile (package = ) [public final class ClassLiteralKt {...]
|
||||
UClass (name = ClassLiteralKt) [public final class ClassLiteralKt {...}]
|
||||
UField (name = stringClass) [@org.jetbrains.annotations.NotNull private static final var stringClass: kotlin.reflect.KClass<java.lang.String> = java.lang.String]
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull) [@org.jetbrains.annotations.NotNull]
|
||||
UClassLiteralExpression [java.lang.String] : PsiType:KClass<String>
|
||||
USimpleNameReferenceExpression (identifier = String) [String] : PsiType:String
|
||||
UMethod (name = getStringClass) [public static final fun getStringClass() : kotlin.reflect.KClass<java.lang.String> = UastEmptyExpression]
|
||||
UMethod (name = box) [public static final fun box() : java.lang.String {...}]
|
||||
UBlockExpression [{...}] : PsiType:Void
|
||||
UDeclarationsExpression [var x: java.lang.CharSequence = ""]
|
||||
ULocalVariable (name = x) [var x: java.lang.CharSequence = ""]
|
||||
UPolyadicExpression (operator = +) [""] : PsiType:String
|
||||
ULiteralExpression (value = "") [""] : PsiType:String
|
||||
UDeclarationsExpression [var xClass: kotlin.reflect.KClass<? extends java.lang.CharSequence> = java.lang.CharSequence]
|
||||
ULocalVariable (name = xClass) [var xClass: kotlin.reflect.KClass<? extends java.lang.CharSequence> = java.lang.CharSequence]
|
||||
UClassLiteralExpression [java.lang.CharSequence] : PsiType:KClass<? extends CharSequence>
|
||||
USimpleNameReferenceExpression (identifier = x) [x] : PsiType:CharSequence
|
||||
UReturnExpression [return if (xClass == stringClass) "OK" else xClass] : PsiType:Void
|
||||
UIfExpression [if (xClass == stringClass) "OK" else xClass] : PsiType:String
|
||||
UBinaryExpression (operator = ==) [xClass == stringClass] : PsiType:boolean
|
||||
USimpleNameReferenceExpression (identifier = xClass) [xClass] : PsiType:KClass<? extends CharSequence>
|
||||
USimpleNameReferenceExpression (identifier = stringClass) [stringClass] : PsiType:KClass<String>
|
||||
UPolyadicExpression (operator = +) ["OK"] : PsiType:String
|
||||
ULiteralExpression (value = "OK") ["OK"] : PsiType:String
|
||||
UPolyadicExpression (operator = +) [xClass] : PsiType:String
|
||||
USimpleNameReferenceExpression (identifier = xClass) [xClass] : PsiType:KClass<? extends CharSequence>
|
||||
UClass (name = Foo) [public final class Foo {...}]
|
||||
UField (name = s) [@org.jetbrains.annotations.NotNull private final var s: java.lang.String]
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull) [@org.jetbrains.annotations.NotNull]
|
||||
UMethod (name = equals) [public fun equals(@org.jetbrains.annotations.Nullable other: java.lang.Object) : boolean {...}]
|
||||
UParameter (name = other) [@org.jetbrains.annotations.Nullable var other: java.lang.Object]
|
||||
UAnnotation (fqName = org.jetbrains.annotations.Nullable) [@org.jetbrains.annotations.Nullable]
|
||||
UBlockExpression [{...}] : PsiType:Void
|
||||
UIfExpression [if (other == null) return false] : PsiType:Unit
|
||||
UBinaryExpression (operator = ==) [other == null] : PsiType:boolean
|
||||
USimpleNameReferenceExpression (identifier = other) [other] : PsiType:Object
|
||||
ULiteralExpression (value = null) [null] : PsiType:Void
|
||||
UReturnExpression [return false] : PsiType:Void
|
||||
ULiteralExpression (value = false) [false] : PsiType:boolean
|
||||
UIfExpression [if (java.lang.Object != Foo) return false] : PsiType:Unit
|
||||
UBinaryExpression (operator = !=) [java.lang.Object != Foo] : PsiType:boolean
|
||||
UClassLiteralExpression [java.lang.Object] : PsiType:KClass<? extends Object>
|
||||
USimpleNameReferenceExpression (identifier = other) [other] : PsiType:Object
|
||||
UClassLiteralExpression [Foo] : PsiType:KClass<? extends Foo>
|
||||
UThisExpression (label = null) [this] : PsiType:Foo
|
||||
UReturnExpression [return false] : PsiType:Void
|
||||
ULiteralExpression (value = false) [false] : PsiType:boolean
|
||||
UReturnExpression [return s == (other as Foo).s] : PsiType:Void
|
||||
UBinaryExpression (operator = ==) [s == (other as Foo).s] : PsiType:boolean
|
||||
USimpleNameReferenceExpression (identifier = s) [s] : PsiType:String
|
||||
UQualifiedReferenceExpression [(other as Foo).s] : PsiType:String
|
||||
UParenthesizedExpression [(other as Foo)] : PsiType:Foo
|
||||
UBinaryExpressionWithType [other as Foo] : PsiType:Foo
|
||||
USimpleNameReferenceExpression (identifier = other) [other] : PsiType:Object
|
||||
UTypeReferenceExpression (name = Foo) [Foo]
|
||||
USimpleNameReferenceExpression (identifier = s) [s] : PsiType:String
|
||||
UMethod (name = getS) [public final fun getS() : java.lang.String = UastEmptyExpression]
|
||||
UMethod (name = Foo) [public fun Foo(@org.jetbrains.annotations.NotNull s: java.lang.String) = UastEmptyExpression]
|
||||
UParameter (name = s) [@org.jetbrains.annotations.NotNull var s: java.lang.String]
|
||||
UAnnotation (fqName = org.jetbrains.annotations.NotNull) [@org.jetbrains.annotations.NotNull]
|
||||
@@ -10,6 +10,7 @@ UFile (package = test.pkg)
|
||||
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null)
|
||||
UQualifiedReferenceExpression
|
||||
UClassLiteralExpression
|
||||
USimpleNameReferenceExpression (identifier = String)
|
||||
USimpleNameReferenceExpression (identifier = java)
|
||||
UMethod (name = systemService1)
|
||||
UParameter (name = $this$systemService1)
|
||||
@@ -21,6 +22,7 @@ UFile (package = test.pkg)
|
||||
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null)
|
||||
UQualifiedReferenceExpression
|
||||
UClassLiteralExpression
|
||||
USimpleNameReferenceExpression (identifier = T)
|
||||
USimpleNameReferenceExpression (identifier = java)
|
||||
UClass (name = Context)
|
||||
UMethod (name = ownSystemService2)
|
||||
@@ -31,6 +33,7 @@ UFile (package = test.pkg)
|
||||
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null)
|
||||
UQualifiedReferenceExpression
|
||||
UClassLiteralExpression
|
||||
USimpleNameReferenceExpression (identifier = String)
|
||||
USimpleNameReferenceExpression (identifier = java)
|
||||
UMethod (name = Context)
|
||||
UMethod (name = ownSystemService1)
|
||||
@@ -41,4 +44,5 @@ UFile (package = test.pkg)
|
||||
USimpleNameReferenceExpression (identifier = <anonymous class>, resolvesTo = null)
|
||||
UQualifiedReferenceExpression
|
||||
UClassLiteralExpression
|
||||
USimpleNameReferenceExpression (identifier = T)
|
||||
USimpleNameReferenceExpression (identifier = java)
|
||||
|
||||
@@ -22,6 +22,7 @@ UFile (package = )
|
||||
USimpleNameReferenceExpression (identifier = crashMe, resolvesTo = null)
|
||||
UQualifiedReferenceExpression
|
||||
UClassLiteralExpression
|
||||
USimpleNameReferenceExpression (identifier = Callback)
|
||||
USimpleNameReferenceExpression (identifier = java)
|
||||
ULambdaExpression
|
||||
UBlockExpression
|
||||
|
||||
@@ -22,6 +22,7 @@ UFile (package = )
|
||||
USimpleNameReferenceExpression (identifier = crashMe, resolvesTo = null)
|
||||
UQualifiedReferenceExpression
|
||||
UClassLiteralExpression
|
||||
USimpleNameReferenceExpression (identifier = Callback)
|
||||
USimpleNameReferenceExpression (identifier = java)
|
||||
ULambdaExpression
|
||||
UBlockExpression
|
||||
|
||||
@@ -22,6 +22,7 @@ UFile (package = ) [public abstract interface Callback {...]
|
||||
USimpleNameReferenceExpression (identifier = crashMe, resolvesTo = null) [crashMe] : PsiType:Unit
|
||||
UQualifiedReferenceExpression [Callback.java] : PsiType:Class<Callback>
|
||||
UClassLiteralExpression [Callback] : PsiType:KClass<Callback>
|
||||
USimpleNameReferenceExpression (identifier = Callback) [Callback]
|
||||
USimpleNameReferenceExpression (identifier = java) [java] : PsiType:Class<Callback>
|
||||
ULambdaExpression [{ ...}] : PsiType:Function0<? extends Callback>
|
||||
UBlockExpression [{...}]
|
||||
|
||||
@@ -23,7 +23,6 @@ interface UClassLiteralExpression : UExpression {
|
||||
|
||||
/**
|
||||
* Returns an expression for this class literal expression.
|
||||
* Might be null if the [type] is specified.
|
||||
*/
|
||||
val expression: UExpression?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user