elixir-lang/elixir — pull request #2055 by jwarwick (2014-02-11 04:09:07+00:00)
Title: Fixing result handling of :file.consult

In `Mix.Tasks.Compile.App`, `modules_changed()` was calling `:file.consult()` and handling the result as a tuple. It actually returns a list of tuples (though the `.app` file only contains a single tuple). Updated the `case` statement to use the correct type.

Since `modules_changed()` is private, I don't see how to test that specific case. Too bad `ExUnit` can't test `defp` functions. Just saying.

Found via dialyzer warning:
```
compile.app.ex:76: The pattern {'ok', {'application', _app@1, _properties@1}} can never match the type {'error',atom() | {integer(),atom() | tuple(),_}} | {'ok',[any()]}
```