From 5297b4974f22e273119c42c473ba68f092c9223c Mon Sep 17 00:00:00 2001 From: Denis Zharkov Date: Mon, 18 May 2015 16:18:55 +0300 Subject: [PATCH] Adjust descriptor renderer to latest parsing changes - `constructor` keyword expected in primary constructor with non-empty modifier list - annotation list should be preceeded by '@' --- .../tests/annotations/atAnnotationResolve.txt | 2 +- .../tests/annotations/bracketsDeprecation.txt | 6 +++--- .../tests/annotations/typeAnnotations.txt | 2 +- .../declarationChecks/FunctionWithMissingNames.txt | 4 ++-- .../annotations/types/ReceiverParameter.kt | 2 +- .../annotations/types/ReceiverParameter.txt | 2 +- .../annotations/types/SimpleTypeAnnotation.kt | 2 +- .../annotations/types/SimpleTypeAnnotation.txt | 2 +- .../annotations/types/SupertypesAndBounds.kt | 4 ++-- .../annotations/types/SupertypesAndBounds.txt | 4 ++-- .../annotations/types/TypeAnnotationWithArguments.kt | 2 +- .../types/TypeAnnotationWithArguments.txt | 2 +- .../kotlin/renderer/DescriptorRendererImpl.java | 3 ++- .../decompiledText/Annotations.expected.kt | 6 +++--- .../AnnotationsOnPrimaryCtr.expected.kt | 2 +- .../decompiledText/ClassWithClassObject.expected.kt | 2 +- .../DependencyOnNestedClasses.expected.kt | 2 +- .../decompiler/decompiledText/Enum.expected.kt | 2 +- .../decompiledText/FlexibleTypes.expected.kt | 2 +- .../decompiledText/FunctionTypes.expected.kt | 2 +- .../decompiledText/NestedClasses.expected.kt | 12 ++++++------ .../decompiledText/SecondaryConstructors.expected.kt | 2 +- .../decompiledText/SimpleClass.expected.kt | 2 +- .../navigation/decompiled/AbstractClass.kt | 2 +- .../decompiled/ClassWithAbstractAndOpenMembers.kt | 2 +- .../navigation/decompiled/ClassWithConstructor.kt | 2 +- .../decompiler/navigation/decompiled/Color.kt | 2 +- .../decompiler/navigation/decompiled/SimpleClass.kt | 2 +- .../navigation/decompiled/SimpleTraitImpl.kt | 2 +- .../navigation/decompiled/WithInnerAndObject.kt | 4 ++-- .../navigation/decompiled/WithTraitClassObject.kt | 2 +- 31 files changed, 45 insertions(+), 44 deletions(-) diff --git a/compiler/testData/diagnostics/tests/annotations/atAnnotationResolve.txt b/compiler/testData/diagnostics/tests/annotations/atAnnotationResolve.txt index b1ecfe80bb0..0d7570e601c 100644 --- a/compiler/testData/diagnostics/tests/annotations/atAnnotationResolve.txt +++ b/compiler/testData/diagnostics/tests/annotations/atAnnotationResolve.txt @@ -3,7 +3,7 @@ package Ann(x = IntegerValueType(1): IntegerValueType(1)) Ann(x = IntegerValueType(2): IntegerValueType(2)) Ann(x = IntegerValueType(3): IntegerValueType(3)) private final class A { Ann() public constructor A() Ann() internal final val x: kotlin.Int = 1 - internal final fun bar(/*0*/ x: [Ann(x = IntegerValueType(1): IntegerValueType(1)) Ann(x = IntegerValueType(2): IntegerValueType(2)) Ann(x = IntegerValueType(3): IntegerValueType(3))] kotlin.Int): kotlin.Unit + internal final fun bar(/*0*/ x: @[Ann(x = IntegerValueType(1): IntegerValueType(1)) Ann(x = IntegerValueType(2): IntegerValueType(2)) Ann(x = IntegerValueType(3): IntegerValueType(3))] kotlin.Int): kotlin.Unit public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean Ann(x = IntegerValueType(5): IntegerValueType(5)) internal final fun foo(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/tests/annotations/bracketsDeprecation.txt b/compiler/testData/diagnostics/tests/annotations/bracketsDeprecation.txt index 5e3623fb546..2a692f57342 100644 --- a/compiler/testData/diagnostics/tests/annotations/bracketsDeprecation.txt +++ b/compiler/testData/diagnostics/tests/annotations/bracketsDeprecation.txt @@ -1,6 +1,6 @@ package -internal val block: ([Ann()] kotlin.String) -> [Ann()] kotlin.String +internal val block: (@[Ann()] kotlin.String) -> @[Ann()] kotlin.String internal val y: kotlin.Array internal fun bar(/*0*/ block: () -> kotlin.Int): kotlin.Int internal fun bar2(): kotlin.Array @@ -13,7 +13,7 @@ Ann() Ann() internal final class A { Ann() internal final fun foo(/*0*/ Ann() x: kotlin.Int): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - internal final fun x(): [Ann()] kotlin.String + internal final fun x(): @[Ann()] kotlin.String } internal final annotation class Ann : kotlin.Annotation { @@ -30,7 +30,7 @@ internal interface B { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -internal interface D : [Ann()] B { +internal interface D : @[Ann()] B { public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String diff --git a/compiler/testData/diagnostics/tests/annotations/typeAnnotations.txt b/compiler/testData/diagnostics/tests/annotations/typeAnnotations.txt index 6ad58164eef..461f8d21ceb 100644 --- a/compiler/testData/diagnostics/tests/annotations/typeAnnotations.txt +++ b/compiler/testData/diagnostics/tests/annotations/typeAnnotations.txt @@ -1,6 +1,6 @@ package -internal fun [[ERROR : x]()] A.foo(/*0*/ a: [[ERROR : x]()] kotlin.Int): kotlin.Unit +internal fun @[[ERROR : x]()] A.foo(/*0*/ a: @[[ERROR : x]()] kotlin.Int): kotlin.Unit internal final class A { public constructor A() diff --git a/compiler/testData/diagnostics/tests/declarationChecks/FunctionWithMissingNames.txt b/compiler/testData/diagnostics/tests/declarationChecks/FunctionWithMissingNames.txt index bd50e068af9..7b7614be495 100644 --- a/compiler/testData/diagnostics/tests/declarationChecks/FunctionWithMissingNames.txt +++ b/compiler/testData/diagnostics/tests/declarationChecks/FunctionWithMissingNames.txt @@ -3,8 +3,8 @@ package a() internal fun (): kotlin.Unit internal fun (): kotlin.Unit internal fun outerFun(): kotlin.Unit +internal fun @[a()] A.(): kotlin.Unit internal fun A.(): kotlin.Unit -internal fun [a()] A.(): kotlin.Unit internal interface A { public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean @@ -25,8 +25,8 @@ internal final class Outer { public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + internal final fun @[a()] A.(): kotlin.Unit internal final fun B.(): kotlin.Unit - internal final fun [a()] A.(): kotlin.Unit } internal final annotation class a : kotlin.Annotation { diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.kt b/compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.kt index 90a8187d9f4..f02ab0d1577 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.kt @@ -2,4 +2,4 @@ package test annotation class A -fun ([A] String).foo() {} +fun (@A String).foo() {} diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.txt b/compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.txt index 76853d55f94..821362e88fa 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.txt @@ -1,6 +1,6 @@ package test -internal fun [test.A()] kotlin.String.foo(): kotlin.Unit +internal fun @[test.A()] kotlin.String.foo(): kotlin.Unit internal final annotation class A : kotlin.Annotation { /*primary*/ public constructor A() diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.kt b/compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.kt index 794c1cc98c4..81fe623b989 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.kt @@ -3,5 +3,5 @@ package test annotation class A class SimpleTypeAnnotation { - fun foo(x: [A] IntRange): [A] Int = 42 + fun foo(x: @A IntRange): @A Int = 42 } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.txt b/compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.txt index 8fd13bb17d3..2e19340c417 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.txt @@ -6,5 +6,5 @@ internal final annotation class A : kotlin.Annotation { internal final class SimpleTypeAnnotation { /*primary*/ public constructor SimpleTypeAnnotation() - internal final fun foo(/*0*/ x: [test.A()] kotlin.IntRange): [test.A()] kotlin.Int + internal final fun foo(/*0*/ x: @[test.A()] kotlin.IntRange): @[test.A()] kotlin.Int } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.kt b/compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.kt index cb0257e8f99..314d699216e 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.kt @@ -2,6 +2,6 @@ package test annotation class A -trait Foo : [A] CharSequence { - fun bar() +trait Foo : @A CharSequence { + fun bar() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.txt b/compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.txt index 0fad587d16f..c19b9bbc9fc 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.txt @@ -4,8 +4,8 @@ internal final annotation class A : kotlin.Annotation { /*primary*/ public constructor A() } -internal interface Foo : [test.A()] kotlin.CharSequence { - internal abstract fun bar(): kotlin.Unit +internal interface Foo : @[test.A()] kotlin.CharSequence { + internal abstract fun bar(): kotlin.Unit public abstract override /*1*/ /*fake_override*/ fun charAt(/*0*/ index: kotlin.Int): kotlin.Char public abstract override /*1*/ /*fake_override*/ fun length(): kotlin.Int public abstract override /*1*/ /*fake_override*/ fun subSequence(/*0*/ start: kotlin.Int, /*1*/ end: kotlin.Int): kotlin.CharSequence diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.kt b/compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.kt index b9507204c34..9e09e32ac43 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.kt @@ -5,5 +5,5 @@ package test annotation class Ann(val x: String, val y: Double) class TypeAnnotationWithArguments { - fun foo(param: [Ann("param", 3.14)] IntRange): [Ann("fun", 2.72)] Unit {} + fun foo(param: @Ann("param", 3.14) IntRange): @Ann("fun", 2.72) Unit {} } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.txt b/compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.txt index 2f8b8e0b2e2..d1f101cacc0 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.txt @@ -10,5 +10,5 @@ internal final annotation class Ann : kotlin.Annotation { internal final class TypeAnnotationWithArguments { /*primary*/ public constructor TypeAnnotationWithArguments() - internal final fun foo(/*0*/ param: [test.Ann(x = "param": kotlin.String, y = 3.14.toDouble(): kotlin.Double)] kotlin.IntRange): [test.Ann(x = "fun": kotlin.String, y = 2.72.toDouble(): kotlin.Double)] kotlin.Unit + internal final fun foo(/*0*/ param: @[test.Ann(x = "param": kotlin.String, y = 3.14.toDouble(): kotlin.Double)] kotlin.IntRange): @[test.Ann(x = "fun": kotlin.String, y = 2.72.toDouble(): kotlin.Double)] kotlin.Unit } diff --git a/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.java b/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.java index eea4adfd806..88cef9fd4ee 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.java +++ b/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.java @@ -559,7 +559,7 @@ public class DescriptorRendererImpl implements DescriptorRenderer { // remove last whitespace annotationsBuilder.setLength(annotationsBuilder.length() - 1); - builder.append("["); + builder.append("@["); builder.append(annotationsBuilder); builder.append("] "); } @@ -1013,6 +1013,7 @@ public class DescriptorRendererImpl implements DescriptorRenderer { builder.append(" "); renderAnnotations(primaryConstructor, builder, true); renderVisibility(primaryConstructor.getVisibility(), builder); + builder.append("constructor"); renderValueParameters(primaryConstructor, builder); } } diff --git a/idea/testData/decompiler/decompiledText/Annotations.expected.kt b/idea/testData/decompiler/decompiledText/Annotations.expected.kt index bb9deade971..11d276d224b 100644 --- a/idea/testData/decompiler/decompiledText/Annotations.expected.kt +++ b/idea/testData/decompiler/decompiledText/Annotations.expected.kt @@ -3,8 +3,8 @@ package test -kotlin.data dependency.A dependency.B dependency.C internal final class Annotations public () { - kotlin.inline dependency.A dependency.B dependency.C internal final val p: [dependency.B] kotlin.Int /* compiled code */ +kotlin.data dependency.A dependency.B dependency.C internal final class Annotations public constructor() { + kotlin.inline dependency.A dependency.B dependency.C internal final val p: @[dependency.B] kotlin.Int /* compiled code */ - kotlin.inline dependency.A dependency.B dependency.C internal final fun f(dependency.A dependency.B dependency.C kotlin.deprecated i: [dependency.A] kotlin.Int): kotlin.Unit { /* compiled code */ } + kotlin.inline dependency.A dependency.B dependency.C internal final fun f(dependency.A dependency.B dependency.C kotlin.deprecated i: @[dependency.A] kotlin.Int): kotlin.Unit { /* compiled code */ } } diff --git a/idea/testData/decompiler/decompiledText/AnnotationsOnPrimaryCtr.expected.kt b/idea/testData/decompiler/decompiledText/AnnotationsOnPrimaryCtr.expected.kt index 8f3724d2538..7b32a40b2d0 100644 --- a/idea/testData/decompiler/decompiledText/AnnotationsOnPrimaryCtr.expected.kt +++ b/idea/testData/decompiler/decompiledText/AnnotationsOnPrimaryCtr.expected.kt @@ -3,6 +3,6 @@ package test -internal final class AnnotationsOnPrimaryCtr [dependency.A dependency.B dependency.C] private () { +internal final class AnnotationsOnPrimaryCtr @[dependency.A dependency.B dependency.C] private constructor() { } diff --git a/idea/testData/decompiler/decompiledText/ClassWithClassObject.expected.kt b/idea/testData/decompiler/decompiledText/ClassWithClassObject.expected.kt index 1ab2b0f5020..1d0af36bab5 100644 --- a/idea/testData/decompiler/decompiledText/ClassWithClassObject.expected.kt +++ b/idea/testData/decompiler/decompiledText/ClassWithClassObject.expected.kt @@ -3,7 +3,7 @@ package test -internal final class ClassWithClassObject public () { +internal final class ClassWithClassObject public constructor() { internal companion object { internal final val a: test.A /* compiled code */ diff --git a/idea/testData/decompiler/decompiledText/DependencyOnNestedClasses.expected.kt b/idea/testData/decompiler/decompiledText/DependencyOnNestedClasses.expected.kt index 240f9011e1f..d99970cb57d 100644 --- a/idea/testData/decompiler/decompiledText/DependencyOnNestedClasses.expected.kt +++ b/idea/testData/decompiler/decompiledText/DependencyOnNestedClasses.expected.kt @@ -3,6 +3,6 @@ package test -public final class DependencyOnNestedClasses public () : dependency.D.Nested { +public final class DependencyOnNestedClasses public constructor() : dependency.D.Nested { internal final fun f(nc: dependency.D.Companion.NestedInClassObject, i: dependency.D.Inner, ii: dependency.D.Inner.Inner, nn: dependency.D.Nested.Nested): dependency.D.Nested { /* compiled code */ } } \ No newline at end of file diff --git a/idea/testData/decompiler/decompiledText/Enum.expected.kt b/idea/testData/decompiler/decompiledText/Enum.expected.kt index 708da73420f..1b8ff0389d5 100644 --- a/idea/testData/decompiler/decompiledText/Enum.expected.kt +++ b/idea/testData/decompiler/decompiledText/Enum.expected.kt @@ -3,7 +3,7 @@ package test -internal final enum class Enum private () : kotlin.Enum { +internal final enum class Enum private constructor() : kotlin.Enum { A B diff --git a/idea/testData/decompiler/decompiledText/FlexibleTypes.expected.kt b/idea/testData/decompiler/decompiledText/FlexibleTypes.expected.kt index 9013c582b1f..7438c283c71 100644 --- a/idea/testData/decompiler/decompiledText/FlexibleTypes.expected.kt +++ b/idea/testData/decompiler/decompiledText/FlexibleTypes.expected.kt @@ -3,7 +3,7 @@ package test -internal abstract class FlexibleTypes public () { +internal abstract class FlexibleTypes public constructor() { internal abstract val p: kotlin.Int /* platform type */ internal abstract fun collection(): kotlin.List /* platform type */ diff --git a/idea/testData/decompiler/decompiledText/FunctionTypes.expected.kt b/idea/testData/decompiler/decompiledText/FunctionTypes.expected.kt index ee453a5f00d..f18c7e21044 100644 --- a/idea/testData/decompiler/decompiledText/FunctionTypes.expected.kt +++ b/idea/testData/decompiler/decompiledText/FunctionTypes.expected.kt @@ -3,7 +3,7 @@ package test -internal final class FunctionTypes public () { +internal final class FunctionTypes public constructor() { public final fun (A.(A) -> A)?.bar(): kotlin.Unit { /* compiled code */ } public final fun ((IP) -> R).compose(f: (P1) -> IP): (P1) -> R { /* compiled code */ } diff --git a/idea/testData/decompiler/decompiledText/NestedClasses.expected.kt b/idea/testData/decompiler/decompiledText/NestedClasses.expected.kt index e1c0b7a1b7d..0cc8889c488 100644 --- a/idea/testData/decompiler/decompiledText/NestedClasses.expected.kt +++ b/idea/testData/decompiler/decompiledText/NestedClasses.expected.kt @@ -3,25 +3,25 @@ package test -internal final class NestedClasses public () { +internal final class NestedClasses public constructor() { internal final fun f(): kotlin.Unit { /* compiled code */ } - public final inner class Inner public () { + public final inner class Inner public constructor() { internal final fun f(): kotlin.Unit { /* compiled code */ } - private final inner class II public () { + private final inner class II public constructor() { internal final fun f(): kotlin.Unit { /* compiled code */ } } } - private final class Nested public () { + private final class Nested public constructor() { internal final fun f(): kotlin.Unit { /* compiled code */ } - internal final inner class NI public () { + internal final inner class NI public constructor() { internal final fun f(): kotlin.Unit { /* compiled code */ } } - public final class NN public () { + public final class NN public constructor() { internal final fun f(): kotlin.Unit { /* compiled code */ } } } diff --git a/idea/testData/decompiler/decompiledText/SecondaryConstructors.expected.kt b/idea/testData/decompiler/decompiledText/SecondaryConstructors.expected.kt index 5d48e67f960..f9401f3ad94 100644 --- a/idea/testData/decompiler/decompiledText/SecondaryConstructors.expected.kt +++ b/idea/testData/decompiler/decompiledText/SecondaryConstructors.expected.kt @@ -3,7 +3,7 @@ package test -internal final class SecondaryConstructors public (x: kotlin.Boolean) { +internal final class SecondaryConstructors public constructor(x: kotlin.Boolean) { test.anno public constructor(x: kotlin.String) { /* compiled code */ } private constructor(x: kotlin.Int) { /* compiled code */ } diff --git a/idea/testData/decompiler/decompiledText/SimpleClass.expected.kt b/idea/testData/decompiler/decompiledText/SimpleClass.expected.kt index c30cdf601bb..bd578a68558 100644 --- a/idea/testData/decompiler/decompiledText/SimpleClass.expected.kt +++ b/idea/testData/decompiler/decompiledText/SimpleClass.expected.kt @@ -3,7 +3,7 @@ package test -internal abstract class SimpleClass public () : dependency.D, dependency.Tr, kotlin.List { +internal abstract class SimpleClass public constructor() : dependency.D, dependency.Tr, kotlin.List { internal final val a: dependency.A /* compiled code */ public final var b: dependency.B /* compiled code */ diff --git a/idea/testData/decompiler/navigation/decompiled/AbstractClass.kt b/idea/testData/decompiler/navigation/decompiled/AbstractClass.kt index e087cb01c79..6fe609de08d 100644 --- a/idea/testData/decompiler/navigation/decompiled/AbstractClass.kt +++ b/idea/testData/decompiler/navigation/decompiled/AbstractClass.kt @@ -3,5 +3,5 @@ package testData.libraries -[[public abstract class AbstractClass public () { +[[public abstract class AbstractClass public constructor() { }]] \ No newline at end of file diff --git a/idea/testData/decompiler/navigation/decompiled/ClassWithAbstractAndOpenMembers.kt b/idea/testData/decompiler/navigation/decompiled/ClassWithAbstractAndOpenMembers.kt index c8b8838ac9c..7f94de21088 100644 --- a/idea/testData/decompiler/navigation/decompiled/ClassWithAbstractAndOpenMembers.kt +++ b/idea/testData/decompiler/navigation/decompiled/ClassWithAbstractAndOpenMembers.kt @@ -3,7 +3,7 @@ package testData.libraries -[[public abstract class ClassWithAbstractAndOpenMembers public () { +[[public abstract class ClassWithAbstractAndOpenMembers public constructor() { [public abstract val abstractVal: kotlin.String] [public abstract var abstractVar: kotlin.String] diff --git a/idea/testData/decompiler/navigation/decompiled/ClassWithConstructor.kt b/idea/testData/decompiler/navigation/decompiled/ClassWithConstructor.kt index 2acdbeed5ea..4c7233f5d4e 100644 --- a/idea/testData/decompiler/navigation/decompiled/ClassWithConstructor.kt +++ b/idea/testData/decompiler/navigation/decompiled/ClassWithConstructor.kt @@ -3,6 +3,6 @@ package testData.libraries -[[public final class ClassWithConstructor public (a: kotlin.String, b: kotlin.Any) { +[[public final class ClassWithConstructor public constructor(a: kotlin.String, b: kotlin.Any) { [internal final val a: kotlin.String /* compiled code */] }]] diff --git a/idea/testData/decompiler/navigation/decompiled/Color.kt b/idea/testData/decompiler/navigation/decompiled/Color.kt index 2f55da464de..24866e5819b 100644 --- a/idea/testData/decompiler/navigation/decompiled/Color.kt +++ b/idea/testData/decompiler/navigation/decompiled/Color.kt @@ -3,7 +3,7 @@ package testData.libraries -[[public final enum class Color private (rgb: kotlin.Int) : kotlin.Enum { +[[public final enum class Color private constructor(rgb: kotlin.Int) : kotlin.Enum { [[RED]] [[GREEN]] diff --git a/idea/testData/decompiler/navigation/decompiled/SimpleClass.kt b/idea/testData/decompiler/navigation/decompiled/SimpleClass.kt index 5c86cc35a6a..197aa96b057 100644 --- a/idea/testData/decompiler/navigation/decompiled/SimpleClass.kt +++ b/idea/testData/decompiler/navigation/decompiled/SimpleClass.kt @@ -3,5 +3,5 @@ package testData.libraries -[[public final class SimpleClass public () { +[[public final class SimpleClass public constructor() { }]] diff --git a/idea/testData/decompiler/navigation/decompiled/SimpleTraitImpl.kt b/idea/testData/decompiler/navigation/decompiled/SimpleTraitImpl.kt index c0116315d10..31b27d1940f 100644 --- a/idea/testData/decompiler/navigation/decompiled/SimpleTraitImpl.kt +++ b/idea/testData/decompiler/navigation/decompiled/SimpleTraitImpl.kt @@ -3,5 +3,5 @@ package testData.libraries -[[public final class SimpleTraitImpl public () : testData.libraries.SimpleTrait { +[[public final class SimpleTraitImpl public constructor() : testData.libraries.SimpleTrait { }]] diff --git a/idea/testData/decompiler/navigation/decompiled/WithInnerAndObject.kt b/idea/testData/decompiler/navigation/decompiled/WithInnerAndObject.kt index 5476fe4c95e..ebcba9b8381 100644 --- a/idea/testData/decompiler/navigation/decompiled/WithInnerAndObject.kt +++ b/idea/testData/decompiler/navigation/decompiled/WithInnerAndObject.kt @@ -3,12 +3,12 @@ package testData.libraries -[[public final class WithInnerAndObject public () { +[[public final class WithInnerAndObject public constructor() { [[public companion object { [internal final fun foo(): kotlin.Unit { /* compiled code */ }] }]] - [[internal final class MyInner public () { + [[internal final class MyInner public constructor() { [internal interface MyInnerInner { [internal abstract fun innerInnerMethod(): kotlin.Unit] }] diff --git a/idea/testData/decompiler/navigation/decompiled/WithTraitClassObject.kt b/idea/testData/decompiler/navigation/decompiled/WithTraitClassObject.kt index 6e177ecf8ca..60461ace207 100644 --- a/idea/testData/decompiler/navigation/decompiled/WithTraitClassObject.kt +++ b/idea/testData/decompiler/navigation/decompiled/WithTraitClassObject.kt @@ -3,7 +3,7 @@ package testData.libraries -[[public final class WithTraitClassObject public () { +[[public final class WithTraitClassObject public constructor() { [[public companion object : testData.libraries.SimpleTrait { }]] }]]