Skip to content

Commit 45ef8fd

Browse files
committed
Document @on_definition runs in reverse order, closes #15481
1 parent 784db65 commit 45ef8fd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/elixir/lib/module.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,8 @@ defmodule Module do
366366
Unlike other hooks, `@on_definition` will only invoke functions and
367367
never macros. This is to avoid `@on_definition` callbacks from
368368
redefining functions that have just been defined in favor of more
369-
explicit approaches.
369+
explicit approaches. They are also invoked in the reverse order of
370+
registration.
370371
371372
When just a module is provided, the function is assumed to be
372373
`__on_definition__/6`.

0 commit comments

Comments
 (0)