@@ -155,14 +155,19 @@ eval_forms(Tree, Binding, Env, Scope) ->
155155 {atom , _ , Atom } ->
156156 {Atom , Binding , NewEnv , NewScope };
157157 _ ->
158- {value , Value , NewBinding } = erl_eval (Erl , ParsedBinding ),
158+ {value , Value , NewBinding } = erl_eval (Erl , ParsedBinding , Env ),
159159 {Value , elixir_scope :dump_binding (NewBinding , NewScope ), NewEnv , NewScope }
160160 end .
161161
162- erl_eval (Erl , ParsedBinding ) ->
162+ erl_eval (Erl , ParsedBinding , E ) ->
163+ case erl_eval :check_command ([Erl ], ParsedBinding ) of
164+ ok -> ok ;
165+ {error , Desc } -> elixir_errors :handle_file_error (? m (E , file ), Desc )
166+ end ,
167+
163168 % Below must be all one line for locations to be the same when the stacktrace
164169 % needs to be extended to the full stacktrace.
165- try erl_eval :expr (Erl , ParsedBinding ) catch Class :Exception -> erlang :raise (Class , Exception , get_stacktrace ()) end .
170+ try erl_eval :expr (Erl , ParsedBinding , none , none , none ) catch Class :Exception -> erlang :raise (Class , Exception , get_stacktrace ()) end .
166171
167172get_stacktrace () ->
168173 Stacktrace = erlang :get_stacktrace (),
0 commit comments