Revert "[PLUGIN API] Make referenceClass resolve type aliases too"

This commit is contained in:
Roman Artemev
2020-07-21 16:35:09 +03:00
committed by romanart
parent cb15570d75
commit c4b4912a71
@@ -78,12 +78,7 @@ open class IrPluginContextImpl(
override fun referenceClass(fqName: FqName): IrClassSymbol? {
assert(!fqName.isRoot)
return resolveSymbol(fqName.parent()) { scope ->
val classifierDescriptor = scope.getContributedClassifier(fqName.shortName(), NoLookupLocation.FROM_BACKEND)
val classDescriptor = when (classifierDescriptor) {
is ClassDescriptor -> classifierDescriptor
is TypeAliasDescriptor -> classifierDescriptor.classDescriptor
else -> error("Unexpected classifier $classifierDescriptor")
}
val classDescriptor = scope.getContributedClassifier(fqName.shortName(), NoLookupLocation.FROM_BACKEND) as? ClassDescriptor?
classDescriptor?.let {
st.referenceClass(it)
}