elixir-lang/elixir — pull request #1786 by fishcakez (2013-10-22 16:48:44+00:00)
Title: Optimise raise/1,2 at compile time

The raise macro can be optimised to infer the type of its first argument at compile time, saving a case a run time. This removes many of the dialyzer warnings from #1569, a sample of these are:

```
lib/eex/lib/eex/compiler.ex:50: Guard test is_binary(_@2::'Elixir.EEx.SyntaxError') can never succeed
lib/eex/lib/eex/compiler.ex:58: Guard test is_binary(_@2::'Elixir.EEx.SyntaxError') can never succeed
lib/eex/lib/eex/tokenizer.ex:79: Guard test is_binary(_@2::'Elixir.EEx.SyntaxError') can never succeed
lib/elixir/lib/access.ex:3: Guard test is_binary(_@4::'Elixir.Protocol.UndefinedError') can never succeed
lib/elixir/lib/access.ex:56: The call _@1:'exception'([]) requires that _@1 is of type atom() | tuple() not <<_:8,_:_*1>>
```