IR text tests: Stable blank lines between declarations in class
Rework rendering of kt-like dump and signatures dump in order to avoid unstable blank line between declarations of the same level: 1. No blank line for the first declaration inside the member scope of the class. 2. Always a single blank line between each two subsequent declarations inside the member scope of the class.
This commit is contained in:
committed by
Space Team
parent
4532f52898
commit
16d1e85932
-1
@@ -23,7 +23,6 @@ class TestClass {
|
||||
|
||||
@TestAnn(x = "interface")
|
||||
interface TestInterface {
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(x = "object")
|
||||
|
||||
-1
@@ -23,7 +23,6 @@ class TestClass {
|
||||
|
||||
@TestAnn(x = "interface")
|
||||
interface TestInterface {
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(x = "object")
|
||||
|
||||
+1
-1
@@ -86,6 +86,7 @@ enum class TestEnum : Enum<TestEnum> {
|
||||
// Public signature: /TestEnum.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
private constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: TestEnum#valueOf#static(kotlin.String){}TestEnum
|
||||
// Public signature: /TestEnum.valueOf|1811575739170804829[0]
|
||||
@@ -198,7 +199,6 @@ enum class TestEnum : Enum<TestEnum> {
|
||||
// Public signature: /TestInterface|null[0]
|
||||
@TestAnn(x = "interface")
|
||||
interface TestInterface {
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
|
||||
Vendored
+1
@@ -35,6 +35,7 @@ class TestClass {
|
||||
// Public signature debug description: <init>(){}
|
||||
@TestAnn(x = 1)
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: TestClass#<init>(kotlin.Int){}
|
||||
// Public signature: /TestClass.<init>|-5182794243525578284[0]
|
||||
|
||||
+1
@@ -34,6 +34,7 @@ enum class En : Enum<En> {
|
||||
// Public signature: /En.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
private constructor() /* primary */
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: En.A
|
||||
// Public signature: /En.A|null[0]
|
||||
|
||||
-1
@@ -27,7 +27,6 @@ open annotation class Test2<T1 : Any, T2 : Any?> : Annotation {
|
||||
}
|
||||
|
||||
interface I<T : Any?> {
|
||||
|
||||
}
|
||||
|
||||
open annotation class Test3<T1 : Any?, T2 : I<T1>> : Annotation {
|
||||
|
||||
-1
@@ -27,7 +27,6 @@ open annotation class Test2<T1 : Any, T2 : Any?> : Annotation {
|
||||
}
|
||||
|
||||
interface I<T : Any?> {
|
||||
|
||||
}
|
||||
|
||||
open annotation class Test3<T1 : Any?, T2 : I<T1>> : Annotation {
|
||||
|
||||
-1
@@ -180,6 +180,5 @@ class CC {
|
||||
// Mangled name: ann.I
|
||||
// Public signature: ann/I|null[0]
|
||||
interface I<T : Any?> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -128,7 +128,6 @@ class ExplicitOverride : IFoo {
|
||||
// Mangled name: IFoo
|
||||
// Public signature: /IFoo|null[0]
|
||||
interface IFoo {
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: IFoo@kotlin.String{}extProp
|
||||
// Public signature: /IFoo.extProp|9137761441129982647[0]
|
||||
|
||||
Vendored
+1
@@ -47,6 +47,7 @@ data class MyContainer {
|
||||
// Public signature: /MyContainer.<init>|-5182794243525578284[0]
|
||||
// Public signature debug description: <init>(kotlin.Int){}
|
||||
constructor(i: Int) /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: MyContainer#component1(){}kotlin.Int
|
||||
// Public signature: /MyContainer.component1|-8217597213800111288[0]
|
||||
|
||||
+1
@@ -27,6 +27,7 @@ data class MyContainer {
|
||||
// Public signature: /MyContainer.<init>|1280618353163213788[0]
|
||||
// Public signature debug description: <init>(kotlin.String){}
|
||||
constructor(s: String) /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: MyContainer#component1(){}kotlin.String
|
||||
// Public signature: /MyContainer.component1|-7481405593404337796[0]
|
||||
|
||||
Vendored
+1
@@ -47,6 +47,7 @@ data class Result {
|
||||
// Public signature: /Result.<init>|-5182794243525578284[0]
|
||||
// Public signature debug description: <init>(kotlin.Int){}
|
||||
constructor(i: Int) /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Result#component1(){}kotlin.Int
|
||||
// Public signature: /Result.component1|-8217597213800111288[0]
|
||||
|
||||
-2
@@ -24,7 +24,6 @@ class Circle : Shape {
|
||||
// Mangled name: Canvas
|
||||
// Public signature: /Canvas|null[0]
|
||||
interface Canvas {
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: Canvas{}suffix
|
||||
// Public signature: /Canvas.suffix|-3301965527200666288[0]
|
||||
@@ -46,7 +45,6 @@ interface Canvas {
|
||||
// Mangled name: Shape
|
||||
// Public signature: /Shape|null[0]
|
||||
interface Shape {
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Shape#draw!Canvas(){}kotlin.String
|
||||
// Public signature: /Shape.draw|-6733499063990640842[0]
|
||||
|
||||
+1
@@ -37,6 +37,7 @@ data class Pair<A : Any?, B : Any?> {
|
||||
// Public signature: /Pair.<init>|3086114026882374588[0]
|
||||
// Public signature debug description: <init>(1:0;1:1){}
|
||||
constructor(first: A, second: B) /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Pair#component1(){}1:0
|
||||
// Public signature: /Pair.component1|2393470133763651536[0]
|
||||
|
||||
-1
@@ -33,7 +33,6 @@ interface Monoid<T : Any?> : Semigroup<T> {
|
||||
// Mangled name: Semigroup
|
||||
// Public signature: /Semigroup|null[0]
|
||||
interface Semigroup<T : Any?> {
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Semigroup#combine@1:0(1:0){}1:0
|
||||
// Public signature: /Semigroup.combine|-3517256775590682507[0]
|
||||
|
||||
+2
@@ -27,6 +27,7 @@ data class Counter {
|
||||
// Public signature: /Counter.<init>|-5182794243525578284[0]
|
||||
// Public signature debug description: <init>(kotlin.Int){}
|
||||
constructor(i: Int) /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Counter#component1(){}kotlin.Int
|
||||
// Public signature: /Counter.component1|-8217597213800111288[0]
|
||||
@@ -103,6 +104,7 @@ data class CounterConfig {
|
||||
// Public signature: /CounterConfig.<init>|-5182794243525578284[0]
|
||||
// Public signature debug description: <init>(kotlin.Int){}
|
||||
constructor(max: Int) /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: CounterConfig#component1(){}kotlin.Int
|
||||
// Public signature: /CounterConfig.component1|-8217597213800111288[0]
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
interface Lazy<T : Any?> {
|
||||
|
||||
}
|
||||
|
||||
fun test1($context_receiver_0: Lazy<Int>, $context_receiver_1: Lazy<CharSequence>) {
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// Mangled name: Lazy
|
||||
// Public signature: /Lazy|null[0]
|
||||
interface Lazy<T : Any?> {
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
|
||||
-1
@@ -14,7 +14,6 @@ class Matrix {
|
||||
// Mangled name: NumberOperations
|
||||
// Public signature: /NumberOperations|null[0]
|
||||
interface NumberOperations {
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: NumberOperations#plus@kotlin.Number(kotlin.Number){}kotlin.Number
|
||||
// Public signature: /NumberOperations.plus|-6518987633126930952[0]
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// Mangled name: A
|
||||
// Public signature: /A|null[0]
|
||||
interface A {
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: A#a(){}kotlin.Int
|
||||
// Public signature: /A.a|5993980063692763883[0]
|
||||
@@ -19,7 +18,6 @@ interface A {
|
||||
// Mangled name: B
|
||||
// Public signature: /B|null[0]
|
||||
interface B {
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: B#b(){}kotlin.Int
|
||||
// Public signature: /B.b|-6472101675379091489[0]
|
||||
|
||||
+1
@@ -42,6 +42,7 @@ data class Result {
|
||||
// Public signature: /Result.<init>|-5182794243525578284[0]
|
||||
// Public signature debug description: <init>(kotlin.Int){}
|
||||
constructor(i: Int) /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Result#component1(){}kotlin.Int
|
||||
// Public signature: /Result.component1|-8217597213800111288[0]
|
||||
|
||||
+2
-1
@@ -66,6 +66,7 @@ class Derived : DerivedBase, Base {
|
||||
// Public signature: foo/Derived.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: foo.Derived#foo(kotlin.String){}kotlin.String
|
||||
// Public signature: foo/Derived.foo|-5534735991146511619[0]
|
||||
@@ -87,6 +88,7 @@ class Derived1 : DerivedBase, Base {
|
||||
// Public signature: foo/Derived1.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: foo.Derived1#foo(kotlin.String){}kotlin.String
|
||||
// Public signature: foo/Derived1.foo|-5534735991146511619[0]
|
||||
@@ -115,7 +117,6 @@ open class DerivedBase {
|
||||
// Mangled name: foo.Base
|
||||
// Public signature: foo/Base|null[0]
|
||||
interface Base {
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: foo.Base#foo(kotlin.String){}kotlin.String
|
||||
// Public signature: foo/Base.foo|-5534735991146511619[0]
|
||||
|
||||
+3
-2
@@ -103,6 +103,7 @@ class Derived : DerivedBase, Base, Base2 {
|
||||
// Public signature: foo/Derived.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: foo.Derived#bar(kotlin.String){}kotlin.String
|
||||
// Public signature: foo/Derived.bar|2000415168157940991[0]
|
||||
@@ -134,6 +135,7 @@ class Derived1 : DerivedBase, Base, Base2 {
|
||||
// Public signature: foo/Derived1.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: foo.Derived1#bar(kotlin.String){}kotlin.String
|
||||
// Public signature: foo/Derived1.bar|2000415168157940991[0]
|
||||
@@ -165,6 +167,7 @@ class Derived2 : DerivedBase, Base, Base2 {
|
||||
// Public signature: foo/Derived2.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: foo.Derived2#bar(kotlin.String){}kotlin.String
|
||||
// Public signature: foo/Derived2.bar|2000415168157940991[0]
|
||||
@@ -203,7 +206,6 @@ open class DerivedBase {
|
||||
// Mangled name: foo.Base
|
||||
// Public signature: foo/Base|null[0]
|
||||
interface Base {
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: foo.Base#foo(kotlin.String){}kotlin.String
|
||||
// Public signature: foo/Base.foo|-5534735991146511619[0]
|
||||
@@ -220,7 +222,6 @@ interface Base {
|
||||
// Mangled name: foo.Base2
|
||||
// Public signature: foo/Base2|null[0]
|
||||
interface Base2 {
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: foo.Base2#bar(kotlin.String){}kotlin.String
|
||||
// Public signature: foo/Base2.bar|2000415168157940991[0]
|
||||
|
||||
@@ -53,7 +53,6 @@ class Test1 : CFoo<String>, IBar, IFooStr {
|
||||
// Mangled name: IBar
|
||||
// Public signature: /IBar|null[0]
|
||||
interface IBar {
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: IBar{}bar
|
||||
// Public signature: /IBar.bar|-7864284097863469857[0]
|
||||
@@ -75,7 +74,6 @@ interface IBar {
|
||||
// Mangled name: IFooStr
|
||||
// Public signature: /IFooStr|null[0]
|
||||
interface IFooStr {
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: IFooStr#foo(kotlin.String){}
|
||||
// Public signature: /IFooStr.foo|1351044947738582195[0]
|
||||
|
||||
+2
@@ -22,6 +22,7 @@ value class IT {
|
||||
// Public signature: /IT.<init>|-5182794243525578284[0]
|
||||
// Public signature debug description: <init>(kotlin.Int){}
|
||||
constructor(x: Int) /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: IT#equals(kotlin.Any?){}kotlin.Boolean
|
||||
// Public signature: /IT.equals|722809408929142791[0]
|
||||
@@ -78,6 +79,7 @@ value class InlineMutableSet : MutableSet<IT> {
|
||||
// Public signature: /InlineMutableSet.<init>|-3183535736515224569[0]
|
||||
// Public signature debug description: <init>(kotlin.collections.MutableSet<IT>){}
|
||||
constructor(ms: MutableSet<IT>) /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: InlineMutableSet#equals(kotlin.Any?){}kotlin.Boolean
|
||||
// Public signature: /InlineMutableSet.equals|722809408929142791[0]
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// Mangled name: C
|
||||
// Public signature: /C|null[0]
|
||||
interface C {
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: C{}test1
|
||||
// Public signature: /C.test1|6005685442305498193[0]
|
||||
|
||||
+1
@@ -19,6 +19,7 @@ data class MyRec : Record {
|
||||
// Public signature: /MyRec.<init>|1280618353163213788[0]
|
||||
// Public signature debug description: <init>(kotlin.String){}
|
||||
constructor(name: String) /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: MyRec#component1(){}kotlin.String
|
||||
// Public signature: /MyRec.component1|-7481405593404337796[0]
|
||||
|
||||
@@ -29,7 +29,6 @@ class A : I {
|
||||
// Mangled name: I
|
||||
// Public signature: /I|null[0]
|
||||
interface I {
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: I@0:0{0§<kotlin.Any?>}id
|
||||
// Public signature: /I.id|6409895071901545951[0]
|
||||
|
||||
@@ -57,7 +57,6 @@ data class LoginSuccessPacket {
|
||||
|
||||
typealias Uuid = @MySerializable(c = UuidSerializer::class) Uuid1
|
||||
interface MySerializer<T : Any?> {
|
||||
|
||||
}
|
||||
|
||||
object UuidSerializer : MySerializer<@MySerializable(c = UuidSerializer::class) Uuid1> {
|
||||
|
||||
@@ -50,6 +50,7 @@ data class LoginSuccessPacket {
|
||||
// Public signature: /LoginSuccessPacket.<init>|-1666114669831529718[0]
|
||||
// Public signature debug description: <init>(Uuid1){}
|
||||
constructor(id: @MySerializable(c = UuidSerializer::class) Uuid1) /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: LoginSuccessPacket#component1(){}Uuid1
|
||||
// Public signature: /LoginSuccessPacket.component1|-3428488995872773450[0]
|
||||
@@ -118,7 +119,6 @@ class Uuid1 {
|
||||
// Mangled name: MySerializer
|
||||
// Public signature: /MySerializer|null[0]
|
||||
interface MySerializer<T : Any?> {
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
|
||||
+2
@@ -1,11 +1,13 @@
|
||||
expect abstract class A {
|
||||
protected expect constructor() /* primary */
|
||||
|
||||
expect abstract fun foo()
|
||||
|
||||
}
|
||||
|
||||
expect open class B : A {
|
||||
expect constructor(i: Int) /* primary */
|
||||
|
||||
expect override fun foo()
|
||||
|
||||
expect open fun bar(s: String)
|
||||
|
||||
Vendored
-2
@@ -4,7 +4,6 @@
|
||||
// Mangled name: I1
|
||||
// Public signature: /I1|null[0]
|
||||
interface I1 {
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: I1#f(){}kotlin.String
|
||||
// Public signature: /I1.f|9098388873611041001[0]
|
||||
@@ -36,7 +35,6 @@ interface I1 {
|
||||
// Mangled name: I2
|
||||
// Public signature: /I2|null[0]
|
||||
interface I2 {
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: I2#f(){}kotlin.String
|
||||
// Public signature: /I2.f|9098388873611041001[0]
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
expect open class C1 {
|
||||
expect constructor() /* primary */
|
||||
|
||||
expect fun f(): String
|
||||
|
||||
expect val p: Int
|
||||
|
||||
+1
@@ -128,6 +128,7 @@ enum class MyEnum : Enum<MyEnum> {
|
||||
// Public signature: /MyEnum.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
private constructor() /* primary */
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: MyEnum.BAR
|
||||
// Public signature: /MyEnum.BAR|null[0]
|
||||
|
||||
+1
@@ -11,6 +11,7 @@ enum class MyEnum : Enum<MyEnum> {
|
||||
// Public signature: /MyEnum.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
private constructor() /* primary */
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: MyEnum.BAR
|
||||
// Public signature: /MyEnum.BAR|null[0]
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
interface TestInterface<T : Any?> {
|
||||
interface TestNestedInterface<TT : Any?> {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ interface TestInterface<T : Any?> {
|
||||
// Mangled name: TestInterface.TestNestedInterface
|
||||
// Public signature: /TestInterface.TestNestedInterface|null[0]
|
||||
interface TestNestedInterface<TT : Any?> {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -83,6 +83,7 @@ class Test2 {
|
||||
// Public signature: /Test2.TestInner.<init>|-8731461708390519279[0]
|
||||
// Public signature debug description: <init>(1:0){}
|
||||
constructor(z: Z) /* primary */
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: Test2.TestInner#<init>(1:0;kotlin.Int){}
|
||||
// Public signature: /Test2.TestInner.<init>|7281397193015694517[0]
|
||||
@@ -165,6 +166,7 @@ class Test4<T : Any?> {
|
||||
// Public signature: /Test4.<init>|-5182794243525578284[0]
|
||||
// Public signature debug description: <init>(kotlin.Int){}
|
||||
constructor(x: Int) /* primary */
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: Test4#<init>(kotlin.Int;kotlin.Int){}
|
||||
// Public signature: /Test4.<init>|-7691762014320324121[0]
|
||||
|
||||
+1
@@ -37,6 +37,7 @@ data class Test<T : Any?> {
|
||||
// Public signature: /Test.<init>|-7411275398527089511[0]
|
||||
// Public signature debug description: <init>(1:0;kotlin.String){}
|
||||
constructor(x: T, y: String) /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Test#component1(){}1:0
|
||||
// Public signature: /Test.component1|2393470133763651536[0]
|
||||
|
||||
+1
-1
@@ -7,6 +7,7 @@ class Test<TT : Any?> : IBase<TT> {
|
||||
// Public signature: /Test.<init>|-3017997426280513504[0]
|
||||
// Public signature debug description: <init>(IBase<1:0>){}
|
||||
constructor(impl: IBase<TT>) /* primary */
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: Test#foo(kotlin.Int){}
|
||||
// Public signature: /Test.foo|-104159190164110731[0]
|
||||
@@ -40,7 +41,6 @@ class Test<TT : Any?> : IBase<TT> {
|
||||
// Mangled name: IBase
|
||||
// Public signature: /IBase|null[0]
|
||||
interface IBase<T : Any?> {
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: IBase#foo(kotlin.Int){}
|
||||
// Public signature: /IBase.foo|-104159190164110731[0]
|
||||
|
||||
@@ -13,5 +13,4 @@ class C {
|
||||
|
||||
@Suppress(names = ["TOPLEVEL_TYPEALIASES_ONLY"])
|
||||
typealias TestNested = String
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user