Files
kotlin-fork/idea/testData/inspections/redundantVisibilityModifier/redundantVisibilityModifier.kt
T
2018-04-18 11:17:52 +03:00

49 lines
718 B
Kotlin
Vendored

public class C {
public val foo: Int = 0
public fun bar() {}
}
open class D {
protected open fun willRemainProtected() {
}
protected open fun willBecomePublic() {
}
}
class E : D() {
protected override fun willRemainProtected() {
}
public override fun willBecomePublic() {
}
}
enum class F private constructor(val x: Int) {
FIRST(42)
}
sealed class G constructor(val y: Int) {
private constructor(): this(42)
object H : G()
}
interface I {
fun bar()
}
fun f() {
val i = object : I {
internal var foo = 0
override fun bar() {}
}
i.foo = 1
class LocalClass {
internal var foo = 0
}
LocalClass().foo = 1
}