Make ClassDescriptor#classId nullable

Local classes or anonymous objects do not have a class id. Use "!!" almost
everywhere to make assertion explicit
This commit is contained in:
Alexander Udalov
2016-10-14 14:29:05 +03:00
parent 17e54b6d2d
commit 0e9f29fdba
9 changed files with 22 additions and 22 deletions
@@ -81,10 +81,10 @@ private fun PsiMember.relativeClassName(): List<Name> {
}
private fun ClassDescriptor.relativeClassName(): List<Name> {
return classId.relativeClassName.pathSegments().drop(1).orEmpty()
return classId!!.relativeClassName.pathSegments().drop(1).orEmpty()
}
private fun ClassDescriptor.desc(): String = "L" + JvmClassName.byClassId(classId).internalName + ";"
private fun ClassDescriptor.desc(): String = "L" + JvmClassName.byClassId(classId!!).internalName + ";"
private object ByJvmSignatureIndexer : DecompiledTextIndexer<ClassNameAndSignature> {
override fun indexDescriptor(descriptor: DeclarationDescriptor): Collection<ClassNameAndSignature> {