"Convert to primary constructor" inspection: do not report when property has setter
#KT-22142 Fixed
This commit is contained in:
committed by
Yan Zhulanow
parent
08f31758b8
commit
64f6ed586b
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user