Do not set redundant space in string representation of lambdas

This commit is contained in:
Vitaliy.Bibaev
2017-12-25 17:08:57 +03:00
committed by Yan Zhulanow
parent 89abcb82e4
commit da731b9bae
5 changed files with 5 additions and 5 deletions
@@ -13,7 +13,7 @@ class KotlinLambda(override val variableName: String, override val body: CodeBlo
override fun call(callName: String, vararg args: Expression): Expression = TextExpression("(${toCode()})").call(callName, *args) override fun call(callName: String, vararg args: Expression): Expression = TextExpression("(${toCode()})").call(callName, *args)
override fun toCode(indent: Int): String = override fun toCode(indent: Int): String =
"{ $variableName -> \n".withIndent(indent) + "{ $variableName ->\n".withIndent(indent) +
body.toCode(indent + 1) + body.toCode(indent + 1) +
"}" "}"
} }
+1 -1
View File
@@ -1,4 +1,4 @@
{ y -> { y ->
y.method1() y.method1()
y y
} }
@@ -1,3 +1,3 @@
{ y -> { y ->
y y
} }
@@ -1,4 +1,4 @@
{ y -> { y ->
y.method1() y.method1()
y.method2() y.method2()
} }
@@ -1,3 +1,3 @@
{ x -> { x ->
x.method() x.method()
} }