Jvm Codegen: do not throw on malformed delegation to a type parameter

Fix exception on light class building

See KT-15931
This commit is contained in:
Pavel V. Talanov
2017-06-05 14:58:50 +03:00
parent 19db4304bd
commit bdf76f23c4
4 changed files with 51 additions and 14 deletions
@@ -94,6 +94,7 @@ class DelegationTranslator(
private fun getSuperClass(specifier: KtSuperTypeListEntry): ClassDescriptor? =
CodegenUtil.getSuperClassBySuperTypeListEntry(specifier, bindingContext())
?: error("ClassDescriptor of superType should not be null: ${specifier.text}")
private fun generateDelegates(specifier: KtSuperTypeListEntry, toClass: ClassDescriptor, field: Field) {
for ((descriptor, overriddenDescriptor) in DelegationResolver.getDelegates(classDescriptor, toClass)) {