codegen

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Generate API extensions for `Action<*>` methods

The generated extensions replace the `Action<T>` parameters by function

literals with [custom receiver

objects](https://kotlinlang.org/docs/reference/lambdas.html#function-literals-with-receiver)

to provide an experience closer to the Groovy DSL.

Unfortunately it seems the Kotlin compiler will still pick the original

`Action<*>` methods from the interface instead of the generated

extensions with custom receiver objects.

See #1

    • -0
    • +31
    ./ApiExtensionsTest.kt
  1. … 4 more files in changeset.