Support new callable reference expressions in UAST

Manually mute the class literal test in apiCheck.kt; support for new class
literal expressions is postponed because it's not straightforward to combine
both unbound (Type::class) and bound (instance::class) class literals in one
UClassLiteralExpression: in Java they're two very different expressions
(Type.class and instance.getClass())
This commit is contained in:
Alexander Udalov
2016-05-04 20:25:57 +03:00
parent ca76e4d426
commit da42023dd9
6 changed files with 13 additions and 12 deletions
@@ -22,15 +22,15 @@ import org.jetbrains.uast.visitor.UastVisitor
*/
interface UClassLiteralExpression : UExpression {
override fun logString() = "UClassLiteralExpression"
override fun renderString() = type.name + "::class"
override fun renderString() = type?.name.orEmpty() + "::class"
/**
* Returns the type for this class literal expression.
*/
val type: UType
val type: UType?
override fun accept(visitor: UastVisitor) {
visitor.visitClassLiteralExpression(this)
visitor.afterVisitClassLiteralExpression(this)
}
}
}