"Redundant visibility": Fix false positive for overridden setter

#KT-26051 Fixed
This commit is contained in:
Toshiaki Kameyama
2018-08-28 06:52:12 +03:00
committed by Mikhail Glukhikh
parent 1c8e75eb34
commit 3be5f2b843
4 changed files with 51 additions and 2 deletions
@@ -0,0 +1 @@
org.jetbrains.kotlin.idea.inspections.RedundantVisibilityModifierInspection
@@ -0,0 +1,16 @@
// PROBLEM: none
abstract class Foo {
abstract var id: Int
protected set
}
class Bar : Foo() {
override var id: Int = 1
<caret>public set
}
fun test() {
val bar = Bar()
bar.id = 1
}