Intentions to generate accessors for a property #KT-17322 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
fe0f44da94
commit
5a5a27b983
@@ -262,7 +262,10 @@ class KtPsiFactory @JvmOverloads constructor(private val project: Project, val m
|
||||
}
|
||||
|
||||
fun createPropertySetter(expression: KtExpression): KtPropertyAccessor {
|
||||
val property = createProperty("val x get() = 1\nset(value) = TODO()")
|
||||
val property = if (expression is KtBlockExpression)
|
||||
createProperty("val x get() = 1\nset(value) {\n field = value\n }")
|
||||
else
|
||||
createProperty("val x get() = 1\nset(value) = TODO()")
|
||||
val setter = property.setter!!
|
||||
val bodyExpression = setter.bodyExpression!!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user