Preserve original for constructors of LazySubstitutingClassDescriptor

We would like DeclarationDescriptor.getOriginal() to always point to a
(preferably unique) unsubstituted descriptors for the given possibly
substituted descriptor. In case of LazySubstitutingClassDescriptor
(which can be observed for nested generic Java classes), this invariant
was broken, because 'getOriginal()' for constructors of substituted
class returned a copy created for this particular substituted class.
This commit is contained in:
Dmitry Petrov
2019-04-03 18:26:20 +03:00
parent 966daf8341
commit 1c0c01725b
6 changed files with 100 additions and 17 deletions
@@ -463,7 +463,7 @@ open class WrappedClassConstructorDescriptor(
kind: CallableMemberDescriptor.Kind,
copyOverrides: Boolean
): ClassConstructorDescriptor {
TODO("not implemented")
throw UnsupportedOperationException()
}
override fun getModality() = Modality.FINAL