Skip to content

Commit

Permalink
fix(abg): Use "a.to(b)" instead of "a to b" or Kotlin Poet sometimes …
Browse files Browse the repository at this point in the history
…breaks before the "to" which is illegal
  • Loading branch information
Vampire committed Aug 19, 2024
1 parent 2b90ea5 commit 3d2d1e4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,9 @@ private fun Metadata.linkedMapOfInputs(inputTypings: Map<String, Typing>): CodeB
inputs.forEach { (key, value) ->
val asStringCode = inputTypings.getInputTyping(key).asString()
if (!value.shouldBeNonNullInBinding()) {
add("%N?.let { %S to it$asStringCode },\n", key.toCamelCase(), key)
add("%N?.let { %S.to(it$asStringCode) },\n", key.toCamelCase(), key)
} else {
add("%S to %N$asStringCode,\n", key, key.toCamelCase())
add("%S.to(%N$asStringCode),\n", key, key.toCamelCase())
}
}
add("*$CUSTOM_INPUTS.%M().%M(),\n", Types.mapToList, Types.listToArray)
Expand Down

0 comments on commit 3d2d1e4

Please sign in to comment.