Do not set redundant space in string representation of lambdas
This commit is contained in:
committed by
Yan Zhulanow
parent
89abcb82e4
commit
da731b9bae
@@ -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,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()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user