bbdff8c7ce
To get rid of pointless/confusing implementations in ModuleDescriptor, PackageViewDescriptor, TypeParameterDescriptor and others. Note that there are still implementations that do not make sense, for example in those subclasses of VariableDescriptor which are not also subclasses of CallableMemberDescriptor (e.g. ValueParameterDescriptor). Those can be removed by making CallableMemberDescriptor (instead of CallableDescriptor) inherit from Substitutable. However, that would require more changes in the compiler because CallableDescriptor is used rather often in places where in fact only CallableMemberDescriptor instances can appear. Explicit return types and casts are required in some places now because there's no single non-trivial supertype for ClassifierDescriptorWithTypeParameters and CallableDescriptor. Previously it was DeclarationDescriptorWithVisibility, now it's both that and Substitutable<...>