Properly check default kind on inheriting from old DefaultImpls scheme

This commit is contained in:
Mikhael Bogdanov
2020-10-06 13:10:50 +02:00
parent 714d17ac63
commit 5048471835
9 changed files with 67 additions and 6 deletions
@@ -61,7 +61,7 @@ fun CallableMemberDescriptor.isCompiledToJvmDefault(jvmDefault: JvmDefaultMode):
return JvmProtoBufUtil.isNewPlaceForBodyGeneration(clazz.classProto)
}
fun FunctionDescriptor.checkIsImplementationCompiledToJvmDefault(jvmDefaultMode: JvmDefaultMode): Boolean {
fun CallableMemberDescriptor.checkIsImplementationCompiledToJvmDefault(jvmDefaultMode: JvmDefaultMode): Boolean {
val actualImplementation =
(if (kind.isReal) this else findImplementationFromInterface(this))
?: error("Can't find actual implementation for $this")