Converted JetTypeReference to Kotlin

This commit is contained in:
Svetlana Isakova
2015-10-07 21:13:53 +03:00
parent d8e7dccc90
commit 63d9e287b7
11 changed files with 36 additions and 55 deletions
@@ -563,7 +563,7 @@ class PartialBodyResolveFilter(
private fun PsiElement.isStatement() = this is JetExpression && getParent() is JetBlockExpression
private fun JetTypeReference?.containsProbablyNothing()
= this?.getTypeElement()?.anyDescendantOfType<JetUserType> { it.isProbablyNothing() } ?: false
= this?.typeElement?.anyDescendantOfType<JetUserType> { it.isProbablyNothing() } ?: false
}
private inner class StatementMarks {
@@ -59,7 +59,7 @@ private class CachedAliasImportData(val map: Multimap<String, String>, val fileM
private val ALIAS_IMPORT_DATA_KEY = Key<CachedAliasImportData>("ALIAS_IMPORT_MAP_KEY")
public fun JetTypeReference?.isProbablyNothing(): Boolean {
val userType = this?.getTypeElement() as? JetUserType ?: return false
val userType = this?.typeElement as? JetUserType ?: return false
return userType.isProbablyNothing()
}