Skip to content

Instantly share code, notes, and snippets.

@digitalBush
Created November 27, 2013 01:36
Show Gist options
  • Save digitalBush/7669336 to your computer and use it in GitHub Desktop.
Save digitalBush/7669336 to your computer and use it in GitHub Desktop.
Shadowing in Elxir and the resulting decompiled Erlang version.
-file("foo.ex", 1).
-module('Elixir.Foo').
-export(['__info__'/1, test/0]).
'__info__'(functions) -> [{test, 0}];
'__info__'(macros) -> [];
'__info__'(docs) -> [{{test, 0}, 2, def, [], nil}];
'__info__'(moduledoc) -> {1, nil};
'__info__'(module) -> 'Elixir.Foo';
'__info__'(atom) -> module_info(atom).
test() -> i = 1, i@1 = 2.
defmodule Foo do
def test() do
i=1
i=2
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment