[erlang-questions] undefined callback function warning

Anthony Ramine n.oxyde@REDACTED
Fri Oct 18 13:36:29 CEST 2013


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