"Convert to primary constructor" inspection: do not report when property has setter

#KT-22142 Fixed
This commit is contained in:
Toshiaki Kameyama
2020-02-04 18:54:25 +09:00
committed by Yan Zhulanow
parent 08f31758b8
commit 64f6ed586b
2 changed files with 47 additions and 21 deletions
@@ -16,4 +16,17 @@ class NotSingle {
constructor(x: Int) {
this.x = x
}
}
// KT-22142
class Person {
constructor(email: String) {
this.email = email
}
var email: String
set(value) {
require(value.isNotBlank(), { "The email cannot be blank" })
field = value
}
}