[IR][tests] Add cases to visibility-related tests where a callable accidentally starts to override newly added open callable in super class

^KT-53608
This commit is contained in:
Dmitriy Dolovov
2022-09-13 19:03:45 +02:00
parent ec4b85b111
commit cd007c02df
8 changed files with 175 additions and 0 deletions
@@ -17,4 +17,12 @@ open class Container {
protected open fun protectedToPublicOverriddenFunction() = "Container.protectedToPublicOverriddenFunction.v1"
protected open fun protectedToInternalOverriddenFunction() = "Container.protectedToInternalOverriddenFunction.v1"
protected open fun protectedToPrivateOverriddenFunction() = "Container.protectedToPrivateOverriddenFunction.v1"
// public fun newPublicFunction() = "Container.newPublicFunction.v1"
// public open fun newOpenPublicFunction() = "Container.newOpenPublicFunction.v1"
// protected fun newProtectedFunction() = "Container.newProtectedFunction.v1"
// protected open fun newOpenProtectedFunction() = "Container.newOpenProtectedFunction.v1"
// internal fun newInternalFunction() = "Container.newInternalFunction.v1"
// internal open fun newOpenInternalFunction() = "Container.newOpenInternalFunction.v1"
// private fun newPrivateFunction() = "Container.newPrivateFunction.v1"
}
@@ -17,4 +17,12 @@ open class Container {
public open fun protectedToPublicOverriddenFunction() = "Container.protectedToPublicOverriddenFunction.v2"
internal open fun protectedToInternalOverriddenFunction() = "Container.protectedToInternalOverriddenFunction.v2"
private /*open*/ fun protectedToPrivateOverriddenFunction() = "Container.protectedToPrivateOverriddenFunction.v2"
public fun newPublicFunction() = "Container.newPublicFunction.v2"
public open fun newOpenPublicFunction() = "Container.newOpenPublicFunction.v2"
protected fun newProtectedFunction() = "Container.newProtectedFunction.v2"
protected open fun newOpenProtectedFunction() = "Container.newOpenProtectedFunction.v2"
internal fun newInternalFunction() = "Container.newInternalFunction.v2"
internal open fun newOpenInternalFunction() = "Container.newOpenInternalFunction.v2"
private fun newPrivateFunction() = "Container.newPrivateFunction.v2"
}