eproxus / meck

A mocking library for Erlang
http://eproxus.github.io/meck
Apache License 2.0
813 stars 231 forks source link

Attribute errors #110

Closed twonds closed 11 years ago

twonds commented 11 years ago

meck_code_gen:to_forms fails when deprecated attribute is used in a module.

undefined
*unexpected termination of test process*
::{compile_forms,{error,[{[],
                          [{64,erl_lint,
                            {bad_deprecated,{safe_multi_server_call,...}}},
                           {64,erl_lint,{bad_deprecated,{...}}}]}],
                        [{[],[{64,erl_lint,{undefined_behaviour,[...]}}]}]}}

This code generates the above error :

{attribute,52,module,rpc},
   {attribute,64,behaviour,[gen_server]},
   {attribute,64,deprecated,
              [{safe_multi_server_call,2},{safe_multi_server_call,3}]}

If we ignore deprecated the problem is fixed.

eproxus commented 11 years ago

Nice work, thanks!