Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用带有一些自定义行为的 Dialyzer,问题是当我这样做时,Dialyzer 会给我这个错误:
src/max.erl:3: Callback info about the gen_strategy behaviour is not available
我不知道的一件事是如何创建该回调信息。我想将此信息添加到我的行为中,以便我可以从 Dialyzer 进行更多测试。
从 R15B 开始,升级了 Erlang/OTP 编译器,现在它可以处理一个新的模块属性,名为-callback.
-callback.
例子:
-callback init(Args :: term()) -> {ok, State :: term()} | {ok, State :: term(), timeout() | hibernate} | {stop, Reason :: term()} | ignore.
更多关于这里和这里