Skip to content

Conversation

madlep
Copy link
Contributor

@madlep madlep commented Jul 20, 2013

Behaviour callback docs are top accumulated as module attributes, so are therefore stored internally in reverse order to how they were added.

However, they weren't being reversed again when being accessed, so ended up backwards.

Fix is to just reverse them when we get them back out to put them in the right order.

This is used by ex_doc, and callbacks are listed backwards otherwise (e.g. see http://elixir-lang.org/docs/stable/Dict.html )

Raised initially as elixir-lang/ex_doc#47 , but made fix here instead as recommended by @josevalim

These are top accumlated as module attributes, so are therefore stored in reverse order to how they were added. When we get them back out, reverse them again so they're back in the right order. This is used by ex_doc, and callbacks are listed backwards otherwise
josevalim pushed a commit that referenced this pull request Jul 20, 2013
@josevalim josevalim merged commit 90d4043 into elixir-lang:master Jul 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants