[erlang-questions] undefined callback function warning

Minin Maxim Maxim.Minin@REDACTED
Fri Oct 18 13:26:38 CEST 2013


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



More information about the erlang-questions mailing list