DescriptorRenderer: shouldn't render private modifier by default

#KT-31587 Fixed
This commit is contained in:
Dmitry Gridin
2019-10-01 21:26:08 +07:00
parent 847295bf1c
commit 9da6dcf840
5 changed files with 6 additions and 5 deletions
@@ -723,7 +723,8 @@ internal class DescriptorRendererImpl(
private fun renderConstructor(constructor: ConstructorDescriptor, builder: StringBuilder) {
builder.renderAnnotations(constructor)
val visibilityRendered = renderVisibility(constructor.visibility, builder)
val visibilityRendered = (options.renderDefaultVisibility || constructor.constructedClass.modality != Modality.SEALED)
&& renderVisibility(constructor.visibility, builder)
renderMemberKind(constructor, builder)
val constructorKeywordRendered = renderConstructorKeyword || !constructor.isPrimary || visibilityRendered