FIR: add getter visibility and setter return type checks

This commit is contained in:
yantimirov-timur
2021-01-31 22:02:46 +03:00
committed by Mikhail Glukhikh
parent eedc4d8c3f
commit 1dfc3c0520
11 changed files with 71 additions and 37 deletions
@@ -1,26 +0,0 @@
// KT-7042 Providing return type for property setter is not reported as error
var x: Int = 1
// No backing field!
var y: Int
get() = x
set(value): Any {
x = value
}
var z: Int
get() = x
set(value): Unit {
x = value
}
var u: String = ""
set(value): Unit {
field = value
}
var v: String = ""
set(value): String {
field = value
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// KT-7042 Providing return type for property setter is not reported as error
var x: Int = 1