Skip to content

Commit

Permalink
[IR] update testdata: removed extra indentation for function expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
bashor authored and teamcityserver committed Nov 25, 2020
1 parent cf5ba82 commit ab8188b
Show file tree
Hide file tree
Showing 76 changed files with 168 additions and 168 deletions.
2 changes: 1 addition & 1 deletion compiler/testData/ir/irText/classes/initValInLambda.kt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TestInitValInLambdaCalledOnce {
get

init {
1.run<Int, Unit>(block = local fun Int.<anonymous>() {
1.run<Int, Unit>(block = local fun Int.<anonymous>() {
#x = 0
}
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
data class A {
constructor(runA: @ExtensionFunctionType Function2<A, String, Unit> = local fun A.<anonymous>(it: String) {
constructor(runA: @ExtensionFunctionType Function2<A, String, Unit> = local fun A.<anonymous>(it: String) {
return Unit
}
) /* primary */ {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ annotation class Ann : Annotation {
}

val test1: Int /* by */
field = lazy<Int>(initializer = local fun <anonymous>(): Int {
field = lazy<Int>(initializer = local fun <anonymous>(): Int {
return 42
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ annotation class A : Annotation {
fun foo(m: Map<String, Int>) {
@A(x = "foo/test")
val test: Int
val test$delegate: Lazy<Int> = lazy<Int>(initializer = local fun <anonymous>(): Int {
val test$delegate: Lazy<Int> = lazy<Int>(initializer = local fun <anonymous>(): Int {
return 42
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class C {
get

val test7: Int /* by */
field = lazy<Int>(initializer = local fun <anonymous>(): Int {
field = lazy<Int>(initializer = local fun <anonymous>(): Int {
return 42
}
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
val test1: Int /* by */
field = lazy<Int>(initializer = local fun <anonymous>(): Int {
field = lazy<Int>(initializer = local fun <anonymous>(): Int {
return 42
}
)
Expand All @@ -19,7 +19,7 @@ class C {
get

val test2: Int /* by */
field = lazy<Int>(initializer = local fun <anonymous>(): Int {
field = lazy<Int>(initializer = local fun <anonymous>(): Int {
return 42
}
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
fun test1() {
val x: Int
val x$delegate: Lazy<Int> = lazy<Int>(initializer = local fun <anonymous>(): Int {
val x$delegate: Lazy<Int> = lazy<Int>(initializer = local fun <anonymous>(): Int {
return 42
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ val test6: Int
get

val test7: Int /* by */
field = lazy<Int>(initializer = local fun <anonymous>(): Int {
field = lazy<Int>(initializer = local fun <anonymous>(): Int {
return 42
}
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
val test1: Function1<String, String>
field = local fun <anonymous>(it: String): String {
field = local fun <anonymous>(it: String): String {
return it
}

get

val test2: @ExtensionFunctionType Function2<Any, Any, Any>
field = local fun Any.<anonymous>(it: Any): Int {
field = local fun Any.<anonymous>(it: Any): Int {
return it.hashCode()
}

get

val test3: Function2<Int, Int, Unit>
field = local fun <anonymous>(i: Int, j: Int) {
field = local fun <anonymous>(i: Int, j: Int) {
return Unit
}

get

val test4: Function2<Int, Int, Unit>
field = local fun <no name provided>(i: Int, j: Int) {
field = local fun <no name provided>(i: Int, j: Int) {
}

get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ fun box(): String {
result = "OK"
}

return f(, f2 = local fun <anonymous>(): String {
return f(, f2 = local fun <anonymous>(): String {
return "O"
}
).plus(other = f(f1 = local fun <anonymous>(): String {
).plus(other = f(f1 = local fun <anonymous>(): String {
return "K"
}
))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fun test2() {

fun test3() {
while (true) { // BLOCK
val lambda: Function0<Nothing> = local fun <anonymous>(): Nothing {
val lambda: Function0<Nothing> = local fun <anonymous>(): Nothing {
error("") /* ERROR EXPRESSION */
error("") /* ERROR EXPRESSION */
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
fun testBreakFor() {
val xs: IntArray = IntArray(size = 10, init = local fun <anonymous>(i: Int): Int {
val xs: IntArray = IntArray(size = 10, init = local fun <anonymous>(i: Int): Int {
return i
}
)
Expand Down Expand Up @@ -38,7 +38,7 @@ fun testBreakDoWhile() {
}

fun testContinueFor() {
val xs: IntArray = IntArray(size = 10, init = local fun <anonymous>(i: Int): Int {
val xs: IntArray = IntArray(size = 10, init = local fun <anonymous>(i: Int): Int {
return i
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ fun C.extensionBoth(i: Int, s: String = "", vararg t: String) {
}

fun testExtensionVararg() {
use(f = local fun extensionVararg(p0: C, p1: Int) {
use(f = local fun extensionVararg(p0: C, p1: Int) {
p0.extensionVararg(i = p1)
}
)
}

fun testExtensionDefault() {
use(f = local fun extensionDefault(p0: C, p1: Int) {
use(f = local fun extensionDefault(p0: C, p1: Int) {
p0.extensionDefault(i = p1)
}
)
}

fun testExtensionBoth() {
use(f = local fun extensionBoth(p0: C, p1: Int) {
use(f = local fun extensionBoth(p0: C, p1: Int) {
p0.extensionBoth(i = p1)
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,28 @@ fun fnv(vararg xs: Int): Int {
}

fun test0() {
return useUnit0(fn = local fun fn0() {
return useUnit0(fn = local fun fn0() {
fn0() /*~> Unit */
}
)
}

fun test1() {
return useUnit1(fn = local fun fn1(p0: Int) {
return useUnit1(fn = local fun fn1(p0: Int) {
fn1(x = p0) /*~> Unit */
}
)
}

fun testV0() {
return useUnit0(fn = local fun fnv() {
return useUnit0(fn = local fun fnv() {
fnv() /*~> Unit */
}
)
}

fun testV1() {
return useUnit1(fn = local fun fnv(p0: Int) {
return useUnit1(fn = local fun fnv(p0: Int) {
fnv(xs = [p0]) /*~> Unit */
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fun withVararg(vararg xs: Int): Int {
fun test1() {
{ // BLOCK
val tmp0_array: A = A
val tmp2_sam: IFoo = local fun withVararg(p0: Int) {
val tmp2_sam: IFoo = local fun withVararg(p0: Int) {
withVararg(xs = [p0]) /*~> Unit */
}
/*-> IFoo */
Expand All @@ -57,7 +57,7 @@ fun test1() {
fun test2() {
{ // BLOCK
val tmp0_array: B = B
val tmp2_sam: IFoo2 = local fun withVararg(p0: Int) {
val tmp2_sam: IFoo2 = local fun withVararg(p0: Int) {
withVararg(xs = [p0]) /*~> Unit */
}
/*-> IFoo2 */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Outer {
}

fun testConstructor(): Any {
return use(fn = local fun <init>(p0: Int): C {
return use(fn = local fun <init>(p0: Int): C {
return C(xs = [p0])
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ fun use(fn: Function0<Any>): Any {
}

fun testFn(): Any {
return use(fn = local fun foo(): String {
return use(fn = local fun foo(): String {
return foo()
}
)
}

fun testCtor(): Any {
return use(fn = local fun <init>(): C {
return use(fn = local fun <init>(): C {
return C()
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class C {
}

fun testLambda() {
useSuspend(fn = local suspend fun <anonymous>() {
useSuspend(fn = local suspend fun <anonymous>() {
foo1()
}
)
Expand All @@ -47,42 +47,42 @@ fun testNoCoversion() {
}

fun testSuspendPlain() {
useSuspend(fn = local suspend fun foo1() {
useSuspend(fn = local suspend fun foo1() {
foo1()
}
)
}

fun testSuspendWithArgs() {
useSuspendInt(fn = local suspend fun fooInt(p0: Int) {
useSuspendInt(fn = local suspend fun fooInt(p0: Int) {
fooInt(x = p0)
}
)
}

fun testWithVararg() {
useSuspend(fn = local suspend fun foo2() {
useSuspend(fn = local suspend fun foo2() {
foo2()
}
)
}

fun testWithVarargMapped() {
useSuspendInt(fn = local suspend fun foo2(p0: Int) {
useSuspendInt(fn = local suspend fun foo2(p0: Int) {
foo2(xs = [p0])
}
)
}

fun testWithCoercionToUnit() {
useSuspend(fn = local suspend fun foo3() {
useSuspend(fn = local suspend fun foo3() {
foo3() /*~> Unit */
}
)
}

fun testWithDefaults() {
useSuspend(fn = local suspend fun foo4() {
useSuspend(fn = local suspend fun foo4() {
foo4()
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ object Obj : A {
}

fun testUnbound() {
use1(fn = local fun foo(p0: A, p1: Int) {
use1(fn = local fun foo(p0: A, p1: Int) {
p0.foo(xs = [p1]) /*~> Unit */
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fun withVararg(vararg xs: Int): Int {
}

fun test() {
useFoo(foo = local fun withVararg(p0: Int) {
useFoo(foo = local fun withVararg(p0: Int) {
withVararg(xs = [p0]) /*~> Unit */
}
/*-> IFoo */)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@ object Host {
}

fun testDefault(): String {
return use(fn = local fun fnWithDefault(p0: Int): String {
return use(fn = local fun fnWithDefault(p0: Int): String {
return fnWithDefault(a = p0)
}
)
}

fun testVararg(): String {
return use(fn = local fun fnWithVarargs(p0: Int): String {
return use(fn = local fun fnWithVarargs(p0: Int): String {
return fnWithVarargs(xs = [p0])
}
)
}

fun testCoercionToUnit() {
return coerceToUnit(fn = local fun fnWithDefault(p0: Int) {
return coerceToUnit(fn = local fun fnWithDefault(p0: Int) {
fnWithDefault(a = p0) /*~> Unit */
}
)
Expand All @@ -66,14 +66,14 @@ fun testImportedObjectMember(): String {
}

fun testDefault0(): String {
return use0(fn = local fun fnWithDefaults(): String {
return use0(fn = local fun fnWithDefaults(): String {
return fnWithDefaults()
}
)
}

fun testVararg0(): String {
return use0(fn = local fun fnWithVarargs(): String {
return use0(fn = local fun fnWithVarargs(): String {
return fnWithVarargs()
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fun sum(vararg args: Int): Int {
}

fun nsum(vararg args: Number): Int {
return sum(args = [*IntArray(size = args.<get-size>(), init = local fun <anonymous>(it: Int): Int {
return sum(args = [*IntArray(size = args.<get-size>(), init = local fun <anonymous>(it: Int): Int {
return args.get(index = it).toInt()
}
)])
Expand All @@ -33,7 +33,7 @@ fun useStringArray(fn: Function1<Array<String>, Unit>) {
}

fun testPlainArgs() {
usePlainArgs(fn = local fun sum(p0: Int, p1: Int): Int {
usePlainArgs(fn = local fun sum(p0: Int, p1: Int): Int {
return sum(args = [p0, p1])
}
)
Expand All @@ -48,7 +48,7 @@ fun testArrayAsVararg() {
}

fun testArrayAndDefaults() {
useStringArray(fn = local fun zap(p0: Array<out String>) {
useStringArray(fn = local fun zap(p0: Array<out String>) {
zap(b = [*p0])
}
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
val test1: Function0<Unit>
field = local fun <anonymous>() {
field = local fun <anonymous>() {
42 /*~> Unit */
}

Expand Down
Loading

0 comments on commit ab8188b

Please sign in to comment.