[erlang-questions] undefined callback function warning
Minin Maxim
Maxim.Minin@REDACTED
Fri Oct 18 14:33:56 CEST 2013
Hello Anthony
Thank you very much for the bug fix.
Sometimes export_all can be useful you know like this :)
-ifdef(TEST).
-compile(export_all).
-endif.
Thanks
Maxim
-----Ursprüngliche Nachricht-----
Von: Anthony Ramine [mailto:n.oxyde@REDACTED]
Gesendet: Freitag, 18. Oktober 2013 13:36
An: Minin Maxim
Cc: erlang-questions
Betreff: Re: [erlang-questions] undefined callback function warning
Hello Minin,
It is a bug, it has been reported earlier on erlang-bugs. I submitted a patch and as it's just a small bug fix it will probably be included in R16B03.
https://github.com/nox/otp/compare/erlang:maint...export_all-behaviour
That being said, one should not use export_all.
Regards,
--
Anthony Ramine
Le 18 oct. 2013 à 13:26, Minin Maxim <Maxim.Minin@REDACTED> a écrit :
> Hello,
>
> I define a behaviour like this:
>
> -module(test_behaviour).
> -callback a() -> ok.
>
> and two modules like this:
>
> -module(test_behaviour_imp).
> -behaviour(test_behaviour).
> -export([a/0]).
> a()->ok.
>
> -module(test_behaviour_imp2).
> -behaviour(test_behaviour).
> -compile(export_all).
> a()->ok.
>
> The module "test_behaviour_imp" compiles without problems, but by the module "test_behaviour_imp2" I get the warning "undefined callback function a/0 (behaviour 'test_behaviour')".
>
> Is it a bug?
>
> Thanks
> Maxim Minin
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
More information about the erlang-questions
mailing list