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
@@ -86,7 +86,7 @@ open class ApiDetector : Detector(), UastScanner {
}
override fun visitClassLiteralExpression(node: UClassLiteralExpression): Boolean {
val clazz = node.type.resolve(context)
val clazz = node.type?.resolve(context)
if (clazz != null) {
checkVersion(context, node, clazz)
}
@@ -430,4 +430,4 @@ open class ApiDetector : Detector(), UastScanner {
ApiDetector::class.java,
Scope.SOURCE_FILE_SCOPE))
}
}
}