KT-41670 Check for default property accessors in SAM interfaces

This commit is contained in:
Pavel Mikhailovskii
2022-09-07 12:17:56 +02:00
committed by teamcity
parent 59a052a615
commit 0b453ee328
10 changed files with 55 additions and 1 deletions
@@ -227,7 +227,8 @@ internal class LambdaMetafactoryArgumentsBuilder(
getAllSuperclasses().any { it.fqNameWhenAvailable == javaIoSerializableFqn }
private fun IrClass.requiresDelegationToDefaultImpls(): Boolean {
for (irMemberFun in functions) {
val functionsAndAccessors = functions + properties.mapNotNull { it.getter } + properties.mapNotNull { it.setter }
for (irMemberFun in functionsAndAccessors) {
if (irMemberFun.modality == Modality.ABSTRACT)
continue
val irImplFun =