ocaml-ppx / ppx_deriving

Type-driven code generation for OCaml
MIT License
466 stars 89 forks source link

Fix the ordering of `make`'s arguments #285

Closed NathanReb closed 6 months ago

NathanReb commented 6 months ago

I introduced a bug in ppx_deriving.make when working on #281 and inadvertently changed the ordering of the arguments of the generated function.

The test suite failed to pick it up because the signature was also generated with [@@deriving make] and the ordering was swapped in both the signature and structure derivers.

I added a module with a handwritten signature and a derived implementation so that this can't happen again in the future.