[Commonizer] Fix internal error when TAs have different expanded classes

^KT-41643
This commit is contained in:
Dmitriy Dolovov
2020-09-04 00:02:00 +07:00
parent d4ef85f6c2
commit 8a7f33f044
@@ -132,8 +132,7 @@ internal class CommonizationVisitor(
if (expandedClassId.packageFqName.isUnderStandardKotlinPackages)
return null // this case is not supported
val expandedClassNode = root.cache.classes[expandedClassId]
?: error("Can't find expanded class node with class ID $expandedClassId for type alias $classId")
val expandedClassNode = root.cache.classes[expandedClassId] ?: return null
val expandedClass = expandedClassNode.targetDeclarations[index]
?: error("Can't find expanded class with class ID $expandedClassId and index $index for type alias $classId")