Skip to content

Commit

Permalink
[IR] update testdata: unify printing custom/non-standard modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
bashor authored and teamcityserver committed Nov 25, 2020
1 parent 90fdfbd commit 69f0f4e
Show file tree
Hide file tree
Showing 24 changed files with 53 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Test1<E : Any?> : IBase<E> {
(<this>.#<$$delegate_0>, <this>).<set-x></* null */>(<set-?> = <set-?>)
}

local /*final field*/ val <$$delegate_0>: IBase<E>
local /* final field */ val <$$delegate_0>: IBase<E>

}

Expand Down Expand Up @@ -68,6 +68,7 @@ class Test2 : IBase<String> {
(<this>.#<$$delegate_0>, <this>).<set-x></* null */>(<set-?> = <set-?>)
}

local /*final field*/ val <$$delegate_0>: IBase<String>
local /* final field */ val <$$delegate_0>: IBase<String>

}

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Test1<E : Any?> : IBase<E> {

}

private /*final field*/ val $$delegate_0: IBase<E> = i
private /* final field */ val $$delegate_0: IBase<E> = i
override fun <B : Any?> foo(a: E, b: B) {
<this>.#$$delegate_0.foo<B>(a = a, b = b)
}
Expand Down Expand Up @@ -48,7 +48,7 @@ class Test2 : IBase<String> {
get
set

private /*final field*/ val $$delegate_0: IBase<String> = j
private /* final field */ val $$delegate_0: IBase<String> = j
override fun <B : Any?> foo(a: String, b: B) {
<this>.#$$delegate_0.foo<B>(a = a, b = b)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class Test1 : IBase {
(<this>.#<$$delegate_0>, <this>).qux()
}

local /*final field*/ val <$$delegate_0>: IBase
local /* final field */ val <$$delegate_0>: IBase

}

Expand All @@ -122,7 +122,7 @@ class Test2 : IBase, IOther {
(<this>.#<$$delegate_0>, <this>).qux()
}

local /*final field*/ val <$$delegate_0>: IBase
local /* final field */ val <$$delegate_0>: IBase
override val x: String
override get(): String {
return <this>.#<$$delegate_1>.<get-x>()
Expand All @@ -149,6 +149,7 @@ class Test2 : IBase, IOther {
(<this>.#<$$delegate_1>, <this>).<set-z2>(<set-?> = <set-?>)
}

local /*final field*/ val <$$delegate_1>: IOther
local /* final field */ val <$$delegate_1>: IOther

}

Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class Test1 : IBase {

}

private /*final field*/ val $$delegate_0: BaseImpl = BaseImpl
private /* final field */ val $$delegate_0: BaseImpl = BaseImpl
override fun bar(): Int {
return <this>.#$$delegate_0.bar()
}
Expand All @@ -106,7 +106,7 @@ class Test2 : IBase, IOther {

}

private /*final field*/ val $$delegate_0: BaseImpl = BaseImpl
private /* final field */ val $$delegate_0: BaseImpl = BaseImpl
override fun bar(): Int {
return <this>.#$$delegate_0.bar()
}
Expand All @@ -119,7 +119,7 @@ class Test2 : IBase, IOther {
(<this>.#$$delegate_0, <this>).qux()
}

private /*final field*/ val $$delegate_1: IOther = otherImpl(x0 = "", y0 = 42)
private /* final field */ val $$delegate_1: IOther = otherImpl(x0 = "", y0 = 42)
override val Byte.z1: Int
override get(): Int {
return (<this>.#$$delegate_1, <this>).<get-z1>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class Test : J {
return <this>.#<$$delegate_0>.returnsFlexible()
}

local /*final field*/ val <$$delegate_0>: J
local /* final field */ val <$$delegate_0>: J

}

Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class C : IFooBar {
<this>.#<$$delegate_0>.foo()
}

local /*final field*/ val <$$delegate_0>: IFooBar
local /* final field */ val <$$delegate_0>: IFooBar

}

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class C : IFooBar {

}

private /*final field*/ val $$delegate_0: FooBarImpl = FooBarImpl
private /* final field */ val $$delegate_0: FooBarImpl = FooBarImpl
override fun foo() {
<this>.#$$delegate_0.foo()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class TestJFoo : IFoo {
return <this>.#<$$delegate_0>.foo()
}

local /*final field*/ val <$$delegate_0>: IFoo
local /* final field */ val <$$delegate_0>: IFoo

}

Expand All @@ -75,7 +75,7 @@ class TestK1 : IFoo {
return <this>.#<$$delegate_0>.foo()
}

local /*final field*/ val <$$delegate_0>: IFoo
local /* final field */ val <$$delegate_0>: IFoo

}

Expand All @@ -91,7 +91,7 @@ class TestK2 : IFoo {
return <this>.#<$$delegate_0>.foo()
}

local /*final field*/ val <$$delegate_0>: IFoo
local /* final field */ val <$$delegate_0>: IFoo

}

Expand All @@ -107,7 +107,7 @@ class TestK3 : IFoo {
return <this>.#<$$delegate_0>.foo()
}

local /*final field*/ val <$$delegate_0>: IFoo
local /* final field */ val <$$delegate_0>: IFoo

}

Expand All @@ -123,6 +123,7 @@ class TestK4 : IFoo {
return <this>.#<$$delegate_0>.foo()
}

local /*final field*/ val <$$delegate_0>: IFoo
local /* final field */ val <$$delegate_0>: IFoo

}

Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class TestJFoo : IFoo {

}

private /*final field*/ val $$delegate_0: JFoo = JFoo()
private /* final field */ val $$delegate_0: JFoo = JFoo()
override fun foo(): String {
return <this>.#$$delegate_0.foo() /*!! String */
}
Expand All @@ -68,7 +68,7 @@ class TestK1 : IFoo {

}

private /*final field*/ val $$delegate_0: K1 = K1()
private /* final field */ val $$delegate_0: K1 = K1()
override fun foo(): String {
return <this>.#$$delegate_0.foo() /*!! String */
}
Expand All @@ -82,7 +82,7 @@ class TestK2 : IFoo {

}

private /*final field*/ val $$delegate_0: K2 = K2()
private /* final field */ val $$delegate_0: K2 = K2()
override fun foo(): String {
return <this>.#$$delegate_0.foo()
}
Expand All @@ -96,7 +96,7 @@ class TestK3 : IFoo {

}

private /*final field*/ val $$delegate_0: K3 = K3()
private /* final field */ val $$delegate_0: K3 = K3()
override fun foo(): String {
return <this>.#$$delegate_0.foo()
}
Expand All @@ -110,7 +110,7 @@ class TestK4 : IFoo {

}

private /*final field*/ val $$delegate_0: K4 = K4()
private /* final field */ val $$delegate_0: K4 = K4()
override fun foo(): String {
return <this>.#$$delegate_0.foo() /*!! String */
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class DFoo : IFoo {
return (<this>.#<$$delegate_0>, <this>).<get-testExtVal>()
}

local /*final field*/ val <$$delegate_0>: IFoo
local /* final field */ val <$$delegate_0>: IFoo

}

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class DFoo : IFoo {

}

private /*final field*/ val $$delegate_0: IFoo = d
private /* final field */ val $$delegate_0: IFoo = d
@Ann
override fun String.testExtFun() {
(<this>.#$$delegate_0, <this>).testExtFun()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Delegated : IFoo {
return (<this>.#<$$delegate_0>, <this>).<get-extProp>()
}

local /*final field*/ val <$$delegate_0>: IFoo
local /* final field */ val <$$delegate_0>: IFoo

}

Expand Down Expand Up @@ -62,3 +62,4 @@ class ExplicitOverride : IFoo {
}

}

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Delegated : IFoo {

}

private /*final field*/ val $$delegate_0: IFoo = foo
private /* final field */ val $$delegate_0: IFoo = foo
override val String.extProp: String
override get(): String {
return (<this>.#$$delegate_0, <this>).<get-extProp>()
Expand Down
3 changes: 2 additions & 1 deletion compiler/testData/ir/irText/declarations/kt35550.fir.kt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class A : I {
return (<this>.#<$$delegate_0>, <this>).<get-id></* null */>()
}

local /*final field*/ val <$$delegate_0>: I
local /* final field */ val <$$delegate_0>: I

}

2 changes: 1 addition & 1 deletion compiler/testData/ir/irText/declarations/kt35550.kt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class A : I {

}

private /*final field*/ val $$delegate_0: I = i
private /* final field */ val $$delegate_0: I = i
override val <T : Any?> T.id: T
override get(): T {
return (<this>.#$$delegate_0, <this>).<get-id><T>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class Test<TT : Any?> : IBase<TT> {
return <this>.#<$$delegate_0>.<get-bar>()
}

local /*final field*/ val <$$delegate_0>: IBase<TT>
local /* final field */ val <$$delegate_0>: IBase<TT>

}

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Test<TT : Any?> : IBase<TT> {

}

private /*final field*/ val $$delegate_0: IBase<TT> = impl
private /* final field */ val $$delegate_0: IBase<TT> = impl
override fun <X : Any?> qux(t: TT, x: X) {
<this>.#$$delegate_0.qux<X>(t = t, x = x)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ class Impl : A, B {
return <this>.#<$$delegate_0>.<get-size>()
}

local /*final field*/ val <$$delegate_0>: B
local /* final field */ val <$$delegate_0>: B

}

fun box(): String {
return "OK"
}

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Impl : A, B {

}

private /*final field*/ val $$delegate_0: B = b
private /* final field */ val $$delegate_0: B = b
override fun add(element: @FlexibleNullability String?): Boolean {
return <this>.#$$delegate_0.add(element = element)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ data class DataClass : Derived, Delegate {
<this>.#<$$delegate_0>.bar()
}

local /*final field*/ val <$$delegate_0>: Delegate
local /* final field */ val <$$delegate_0>: Delegate
override fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
Expand All @@ -77,3 +77,4 @@ data class DataClass : Derived, Delegate {
}

}

5 changes: 3 additions & 2 deletions compiler/testData/ir/irText/types/javaWildcardType.fir.kt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class C : J, K {
<this>.#<$$delegate_0>.jg2(c = c)
}

local /*final field*/ val <$$delegate_0>: J
local /* final field */ val <$$delegate_0>: J
override fun kf1(): Collection<out CharSequence> {
return <this>.#<$$delegate_1>.kf1()
}
Expand All @@ -48,6 +48,7 @@ class C : J, K {
<this>.#<$$delegate_1>.kg2(c = c)
}

local /*final field*/ val <$$delegate_1>: K
local /* final field */ val <$$delegate_1>: K

}

4 changes: 2 additions & 2 deletions compiler/testData/ir/irText/types/javaWildcardType.kt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class C : J, K {

}

private /*final field*/ val $$delegate_0: J = j
private /* final field */ val $$delegate_0: J = j
override fun jf1(): @FlexibleNullability MutableCollection<out @FlexibleNullability CharSequence?>? {
return <this>.#$$delegate_0.jf1()
}
Expand All @@ -30,7 +30,7 @@ class C : J, K {
<this>.#$$delegate_0.jg2(c = c)
}

private /*final field*/ val $$delegate_1: K = k
private /* final field */ val $$delegate_1: K = k
override fun kf1(): Collection<out CharSequence> {
return <this>.#$$delegate_1.kf1()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class KRaw : JRaw {
return <this>.#<$$delegate_0>.returnsRawGenericOut()
}

local /*final field*/ val <$$delegate_0>: JRaw
local /* final field */ val <$$delegate_0>: JRaw

}

Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class KRaw : JRaw {

}

private /*final field*/ val $$delegate_0: JRaw = j
private /* final field */ val $$delegate_0: JRaw = j
override fun returnsRawGenericIn(): @FlexibleNullability @RawType GenericIn<Number>? {
return <this>.#$$delegate_0.returnsRawGenericIn()
}
Expand Down

0 comments on commit 69f0f4e

Please sign in to comment.