[IR][tests] Add cases to visibility-related tests where a visibility of an open callable in super class is narrowed

^KT-53608
This commit is contained in:
Dmitriy Dolovov
2022-09-15 10:43:23 +02:00
parent 15cf2bab98
commit ec4b85b111
8 changed files with 153 additions and 0 deletions
@@ -13,4 +13,10 @@ fun box() = abiTest {
expectSuccess("Container.protectedToPublicFunction.v2") { c.protectedToPublicFunctionAccess() }
expectFailure(prefixed("function protectedToInternalFunction can not be called")) { c.protectedToInternalFunctionAccess() }
expectFailure(prefixed("function protectedToPrivateFunction can not be called")) { c.protectedToPrivateFunctionAccess() }
expectSuccess("ContainerImpl.publicToProtectedOverriddenFunction") { c.publicToProtectedOverriddenFunction() }
expectSuccess("ContainerImpl.publicToInternalOverriddenFunction") { c.publicToInternalOverriddenFunction() }
expectSuccess("ContainerImpl.publicToPrivateOverriddenFunction") { c.publicToPrivateOverriddenFunction() }
expectSuccess("ContainerImpl.protectedToPublicOverriddenFunction") { c.protectedToPublicOverriddenFunctionAccess() }
expectSuccess("ContainerImpl.protectedToInternalOverriddenFunction") { c.protectedToInternalOverriddenFunctionAccess() }
expectSuccess("ContainerImpl.protectedToPrivateOverriddenFunction") { c.protectedToPrivateOverriddenFunctionAccess() }
}