Handle incorrect code for interface delegation

#KT-15931 Fixed Target versions 1.1.4
This commit is contained in:
Dmitry Petrov
2017-05-29 12:17:00 +03:00
parent 4f132f6d40
commit 78de1fb72c
3 changed files with 17 additions and 11 deletions
@@ -101,12 +101,11 @@ object CodegenUtil {
}
@JvmStatic
fun getSuperClassBySuperTypeListEntry(specifier: KtSuperTypeListEntry, bindingContext: BindingContext): ClassDescriptor {
fun getSuperClassBySuperTypeListEntry(specifier: KtSuperTypeListEntry, bindingContext: BindingContext): ClassDescriptor? {
val superType = bindingContext.get(BindingContext.TYPE, specifier.typeReference!!)
?: error("superType should not be null: ${specifier.text}")
return superType.constructor.declarationDescriptor as? ClassDescriptor
?: error("ClassDescriptor of superType should not be null: ${specifier.text}")
}
@JvmStatic