Skip to content

Commit 3d2d1e4

Browse files
committed
fix(abg): Use "a.to(b)" instead of "a to b" or Kotlin Poet sometimes breaks before the "to" which is illegal
1 parent 2b90ea5 commit 3d2d1e4

File tree

1 file changed

+2
-2
lines changed
  • action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/generation

1 file changed

+2
-2
lines changed

action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/generation/Generation.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,9 @@ private fun Metadata.linkedMapOfInputs(inputTypings: Map<String, Typing>): CodeB
309309
inputs.forEach { (key, value) ->
310310
val asStringCode = inputTypings.getInputTyping(key).asString()
311311
if (!value.shouldBeNonNullInBinding()) {
312-
add("%N?.let { %S to it$asStringCode },\n", key.toCamelCase(), key)
312+
add("%N?.let { %S.to(it$asStringCode) },\n", key.toCamelCase(), key)
313313
} else {
314-
add("%S to %N$asStringCode,\n", key, key.toCamelCase())
314+
add("%S.to(%N$asStringCode),\n", key, key.toCamelCase())
315315
}
316316
}
317317
add("*$CUSTOM_INPUTS.%M().%M(),\n", Types.mapToList, Types.listToArray)

0 commit comments

Comments
 (0)