diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/CollectionStubMethodGenerator.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/CollectionStubMethodGenerator.kt index e06ba3c485b..159ab4526a9 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/CollectionStubMethodGenerator.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/CollectionStubMethodGenerator.kt @@ -227,8 +227,8 @@ class CollectionStubMethodGenerator( else foundOverriddenFromDirectSuperClass.copy( fakeOverride.containingDeclaration, - fakeOverride.modality, - fakeOverride.visibility, + foundOverriddenFromDirectSuperClass.modality, + foundOverriddenFromDirectSuperClass.visibility, fakeOverride.kind, false) newDescriptor.overriddenDescriptors =