FIR: avoid resolve loop between accessor and other members

#KT-48634 Fixed
This commit is contained in:
Mikhail Glukhikh
2021-08-23 18:08:31 +03:00
committed by teamcityserver
parent 72fa330576
commit 19a75b31f9
16 changed files with 186 additions and 29 deletions
@@ -0,0 +1,28 @@
class DrawableGrid(var isEnabled: Boolean)
class My {
private val drawableGrid = createDrawableGrid()
private var useAll = false
set(value) {
drawableGrid.isEnabled = !value
}
private fun createDrawableGrid() = DrawableGrid(false).apply {
if (useAll) -1 else 0
}
}
class Your {
private val drawableGrid = createDrawableGrid()
private var useAll
get() = false
set(value) {
drawableGrid.isEnabled = !value
}
private fun createDrawableGrid() = DrawableGrid(false).apply {
if (useAll) -1 else 0
}
}