Fix property lookup in data class component generation

#KT-49812 Fixed
 #KT-49936 Fixed
This commit is contained in:
Alexander Udalov
2021-11-26 23:17:39 +01:00
parent 2fbd2e2a15
commit be6409f0af
17 changed files with 414 additions and 3 deletions
@@ -317,9 +317,7 @@ open class LazyClassMemberScope(
if (!primaryConstructorParameters.get(parameter.index).hasValOrVar()) continue
val properties = getContributedVariables(parameter.name, location)
if (properties.isEmpty()) continue
val property = properties.iterator().next()
val property = properties.firstOrNull { it.extensionReceiverParameter == null } ?: continue
++componentIndex