FIR body resolve context: fix accessor scope handling

This commit is contained in:
Mikhail Glukhikh
2021-03-17 08:39:21 +03:00
parent ca15df7815
commit ebfc431733
9 changed files with 2520 additions and 2 deletions
@@ -606,7 +606,11 @@ class BodyResolveContext(
f: () -> T
): T {
if (accessor is FirDefaultPropertyAccessor || accessor.body == null) {
return withContainer(accessor, f)
return if (accessor.isGetter) withContainer(accessor, f)
else withTowerDataCleanup {
addLocalScope(FirLocalScope())
withContainer(accessor, f)
}
}
return withTowerDataCleanup {
val receiverTypeRef = property.receiverTypeRef